Raspberry Pi Foundation ● Registered UK charity 1129409 ● Founded in 2009 to aid computing education ● On general sale since 2012, available to all worldwide – Sold to education, industry and hobbyists – Sold 6 million to date ● Free learning resources for makers and educators ● Free teacher training - Picademy (currently UK, soon USA)
Ben Nuttall ● Education Developer Advocate at the Raspberry Pi Foundation – Software & project development – Learning resources & teacher training – Outreach ● Hobbyist turned employee ● Based in Cambridge, UK ● @ben_nuttall on Twitter
Raspberry Pi: Why? ● A programmable device the price of a textbook ● Skills shortage and lack of understanding – Programming – Computer systems – Engineering ● 1980s computer era – Home computing was difficult, but created skilled users
The SD Card ● This is your hard drive – Operating system – Files + programs ● Buy pre-installed or download and install using your PC ● NOOBS (New Out Of the Box Software) – Easy installer – Drag & drop – Contains Raspbian ● Raspbian – Full operating system – Lots of useful software pre-installed
Booting the Pi ● Boot messages are shown ● Learning opportunity – What's happening? – Are there any errors? – Encourages questions ● Pi 1 = 1 Raspberry Pi 2 = 4 Raspberries Why? (hint: single core vs. quad core)
startx To boot to Desktop – and a full Graphical User Interface (GUI), type the command startx and press Enter Note: You can configure the Pi to boot to Desktop or boot to the command line
Internet connection ● Connect ethernet cable before boot and it just works ● Connect ethernet cable after boot usually works too ● WiFi dropdown menu ● Check your IP address – Hover over WiFi icon – hostname -I (in terminal)
Scratch ● Drag & drop block interface to programming ● Logic ● Computational thinking ● Easy to make games ● Impossible to create a program that fails to run! ● Recommended for young children
Sonic Pi ● Sound synthesiser for creating music ● Audible computing ● Uses simple syntax text-based programming language Ruby ● Used for compositions and live coding performances ● Introduce computing concepts through music ● Created especially for education
Python ● Powerful extensible programming language ● Easy to read and write ● Make software, games, GUIs, websites, robots and more ● Ideal for physical computing ● Extensive library of additional modules for Raspberry Pi hardware ● Recommended for education
Minecraft: Pi Edition ● Free version of Minecraft on Raspberry Pi ● Python programming interface ● Learn Python by building things and making games in Minecraft ● Creative computing
Python library - RPi.GPIO ● Included in Raspbian ● Features: – Configure pins as input/output – Read inputs (high/low) – Set outputs (high/low) – Wait for edge (wait for input to go high/low) – Pin event detection (callback on input pin change)
Scratch GPIO ● Third-party download gives access to GPIO pins ● Soon to be implemented in default Scratch ● Drag & drop programming for robots and more!
Flash LED with Python from RPi import GPIO from time import sleep GPIO.setmode(GPIO.BCM) led = 2 GPIO.setup(led, GPIO.OUT) while True: GPIO.output(led, True) sleep(1) GPIO.output(led, False) sleep(1)