GithubHelp home page GithubHelp logo

jp-96 / scratch2-wedo2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtschan/scratch2-wedo2

0.0 2.0 0.0 146 KB

LEGO WeDo 2.0 Extension for Scratch 2

License: GNU General Public License v3.0

Python 100.00%

scratch2-wedo2's Introduction

LEGO WeDo 2.0 Extension for Scratch 2

Introduction

LEGO WeDo 2.0 is a product range of the LEGO Education series for teaching basic engineering and programming to kids at the age of 7+. It communicates through Bluetooth Low Energy and can be programmed with Scratch 2, allowing robotic and non-robotic projects to be implemented in the same visual programming language. Unofficial support for Linux is available through the S2Bot helper app, but only works with the Bluegiga BLED112 Bluetooth Smart Dongle.

This project provides an open source Scratch 2 HTTP extension for LEGO WeDo 2.0 which should work with any Bluetooth LE capable chip supported by Linux.

Installation

For now this project doesn't provide Scratch 2 blocks. You can re-use the templates provided by S2Bot.

  1. Install prerequisites of pygattlib as listed in its DEPENDS file.

  2. Install prerequisites of the extension:

     pip install -r requirements.txt
    
  3. Download and extract S2Bot, only needed for Scratch 2 templates.

Usage

  1. Determine the MAC address of your LEGO WeDo 2.0 Hub:

     sudo hcitool lescan
    
  2. Start the Wedo 2.0 extension with the determined MAC address:

     ./scratch2-wedo2.py MAC_ADDRESS
    

    Depending on your permissions you might have to run it with sudo:

     sudo ./scratch2-wedo2.py MAC_ADDRESS
    
  3. Start Scratch 2.

  4. Open wedo2_template.sb2 from S2Bot.

  5. Save your project under a different name.

  6. The LEGO Wedo 2.0 blocks are now available under Other blocks.

Notes

At the moment the following WeDo 2.0 features are supported:

  • Smarthub button
  • Smarthub light
  • Medium motor
  • Tilt sensor in default tilt mode (any, up, down, left, right)
  • Motion sensor in default distance mode (distance 0 - 10)

scratch2-wedo2's People

Contributors

dtschan avatar

Watchers

James Cloos avatar jp-96 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.