Sunday 29 July 2018

Lego + Code blog 3: The Raspberry Express


Lego + Code blog 3: The Raspberry Express

Here is a demo of 'turtle mode': Link
I have tried to recreate the Micro:bit express but simply swap in Raspberry Pi 3b+ currently. This is not a comprehensive blog just a few notes on how to get yourself started.

Raspberry Pi connected to the Lego Power functions motor:

Closer look at the train:

A few notes:
  • I used a cheap £1 rechargable battery to run the Pi.
  • I used a 4.5 volt battery and motor controller found in the Raspberry Robot kit which you can get here called EduKit 3. Link   
  • Again I have used Python 3 to code the train.
  • To create the remote I have used a GUI library for called GuiZero written by Laura Sachs and contributed by Martin O'Hanlon. Link
  • To connect to the Pi attached to the train and use the remote I have used a free app called RealVNC. Link
  • I think thats the nuts and bolts of it.
  • Here is a screen grab of the really simple remote controller.  
  •  I have managed to code it to use scalable speed both forward and back using GPIO zero. Link which is managed by Ben Nuttall.
  • The turtle option allows you to code a 'coded path' if you look my code below it should be fairly clear.
  • Finally here is the code in its current version: Link
Enjoy :)


Lego Hacking: Lego + Code



Lego Hacking : Lego + Code

Blog 1: Lights on: Link


Blog 2: The Micro:bit Express V1 : Link

Blog 2a: Edublocks Micro:bit Express V1 version(simple motor control)  link

Blog 2b: Edublocks Micro:bit Express V1.5 Remote controlled link

Blog 3: Micro:bit Express 2.0 'adjustable speed' : Link 

Blog 4: The Raspberry Express : Link  

Blog 5 : Micro:bit controlled Lego Ferris Wheel : Link


Blog 6: Raspberry Pi powered Lego Ferris wheel : Link 

Blog 7: 3D printed Lego Christmas Tree / coded light : Link

Blog 8:Lego RC "car" with Raspberry Pi : Link

Blog 9: Blocks controlling blocks: 'Using Minecraft to control Lego motors' : Link


Blog 10: Raspberry Zero Express Link

Blog 11: Stop frame animation with Lego : Link

Blog 12:  Micro:bit controlled Rollercoaster Link

Blog 13: Micro:bit Express EduBlocks simple Link

Blog 14: Micro:bit Express EduBlocks remote controlled Link