Main content
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.
Duration:
This clip is from
More clips from Cracking the Code
-
How pictures can be represented in the form of binary digits
Duration: 04:33