Controlling a robot crocodile using a simple programming toolkit

Schoolchildren use a small, cheap, bare-board computer, known as a Raspberry Pi, to control a model crocodile made of Lego. After plugging in inputs (mouse and keyboard) and outputs (a monitor) to the Raspberry Pi, pupils build the robot crocodile following printed instructions.

The robot includes a further input sensor to detect proximity and an output motor to close or open its mouth. They use the 'Scratch' toolkit on the computer to write a program, by fitting together code blocks with an if/ then block, using sensing values to detect how close the finger is and motor commands that close or open the crocodile's mouth.

Release date:

Duration:

5 minutes

This clip is from