3 ms·
Yes. Raspbian comes with a version of Scratch which has out-of-box support for LEGO WeDo/PowerFunctions. If you get the Lego USB hub part (9581), you can attac
by kbouck 10y ago
Yes. Raspbian comes with a version of Scratch which has out-of-box support for LEGO WeDo/PowerFunctions.
If you get the Lego USB hub part (9581), you can attach Power Functions v1.0 components to your raspberry pi via the hub. Works right away. The USB hub has two channels, so you can use it to control 2 motors, 1 motor + 1 sensor, or 2 sensors.
The LEGO extension to Scratch has controls like:
- Set Motor (A or B or both) to speed 0-100
- Turn Motor (A or B or both) on for x seconds
- Stop Motor ...
- Reverse Motor Direction
- Read tilt/distance sensor value
I've also worked out the IR codes (with the help of others' work) so if you hookup an infrared led to your pi and install LIRC you can imitate the Power Functions remote controls.