Home - Andy’s Raspberry Pi Teaching Resources

Introduction
This set of pages is about setting up a Raspberry Pi with the aim of using it to make learning programming fun. 

The initial set of exercises are about using the Pi General Purpose Input/Output (GPIO or I/O) pins to drive external components eg LEDs and solenoids. The exercises were devised by Andy Austen and Pete Andrew to be used at IT After School Clubs for KS3 and KS4 school pupils.

Initial set up of the Pi
For general Pi related information eg for getting the Pi started from out-of-the-box, please look at the official Pi site:
http://www.raspberrypi.org

This is a useful quick start guide:
http://www.raspberrypi.org/quick-start-guide

Programming environment
Once the Pi is booted up see the following programming environment document for the recommended way to edit and run the code shown in the following exercises. It shows the Traffic Light Board as an example.

Links to Exercise Resources
Note: all these have been used at after school clubs
Traffic Light Board
Two Tin Clonker
Eight LEDs on prototype board
BerryClip Board

Electronics
The Pi can supply enough power to light up several LEDs but if more power is needed - to drive for example a solenoid or motor - then it is necessary use an external power supply. Electronics in the form of a transistor or a chip are needed to switch the power on and off under the control of the I/O pins. This is how computers and microprocessors control devices in the real world eg car fuel injection systems, CNC lathes, traffic lights, robots etc
There are lots of sites selling electronic components. This one has a section for Pi related items:
http://www.hobbytronics.co.uk/raspberry-pi
https://www.modmypi.com

Sample Projects
Once the basics have been mastered, what next? Here's a few examples using a Pi to control external components; it's not all about the hardware, but it gives a purpose to learning how to program a computer to control it.

Toy Robot Arm



Sound helps for this one as the movement isn't very obvious

Snare Drum



Joystick Controlling LEDs


Milk Bottle Xylophone



Pete's solenoid sequencer


Hohner Xylophone.AVI


Sawblade Gong