Computing KS1 / KS2: Programming a robot crocodile

A class builds a Lego crocodile and use Raspberry Pi computers and the Scratch programming language to make it snap its jaws!

Science presenter Minna Kane explains how you can plug your keyboard and monitor into a tiny Raspberry Pi, and use open source coding software to program it.

We see a primary school class build model crocodiles out of Lego, complete with a motorised mouth with a proximity sensor inside it.

The sensor is the input and the motor is the output.

The children use Scratch, a visual programming language, to create the program that will make the mouth snap shut when something is put inside it.

We see their IF/THEN blocks and sensing values using a LESS THAN command, that enable the sensor to detect how close the finger is and snap shut.

This clip is from the series Cracking the Code.

Teacher Notes

This could be used as an introduction to designing and writing programs that accomplish specific goals.

Could also be used to show various forms of input and output.

Curriculum Notes

This clip will be relevant for teaching Computing at KS1 and KS2 in England and Northern Ireland, Design and Technology KS2 in Wales and Computing Science and ICT at Second Level in Scotland.

More from the series Cracking the Code

Computing KS1 / KS2: Creating a simple automated driving simulator
video
Computing KS1 / KS2: Creating computer generated visual effects
video
Computing KS1 / KS2: Programming a computer game
video
Computing KS1 / KS2: Programming a robotic toy car
video
Computing KS1 / KS2: Programming robots to play football
video
Computing KS1 / KS2: Simulating the experience of F1 racing
video
Computing KS1 / KS2: Programming a webcam
video
Computing KS1 / KS2: What are bitmap graphics?
video