Unit 2 - RaspberryPi
Unit 2 - RaspberryPi
Pi
Agenda
• FIRST STEPS
• What is a Raspberry Pi?
• Setting up your Raspberry Pi
• Using your Raspberry Pi as a Desktop
Computer
• PROGRAMMING WITH PYTHON
• Start Programming in Python
• Write your own Function
• Using GPIO to drive outputs and read
inputs
FIRST STEPS
What is a Raspberry Pi?
• A credit-card-sized computer
• Runs on several operating
systems
Raspbian WE WILL USE
RASPBIAN
Windows 10 IoT Core
RetroPie
OpenElec
• Possible to connect with a
variety of sensors to interact with
the physical world.
•Make decisions based on processing of
gathered sensor data
Getting started with your Raspberry Pi
Basic 1-2-3
1.Connect the Raspberry Pi to
the keyboard, mouse and the
screen.
2.Plug in the power and wait
for it to boot.
3.Username : pi
Password : raspberry
(should not be needed)
Using you Raspberry Pi as a Desktop
Computer
• Try to access the internet through your Raspberry Pi and find a
picture that reflects your group. Hands up when you are done, for
help if needed!
• Save this picture to the desktop.
Communicating through the terminal
• Start the terminal by going to
Accessories and then
clicking on the Terminal
program.
General
Purpose
Input /
Output
Use the GPIO to drive outputs and read inputs
• Build the circuit in the figure.
Use 470 Ohm resistor
• Next we will make a program
that makes one LED blink on
and off, and the other dim up
and down in idensity when
the Button is pressed.
Use the GPIO to drive outputs and read inputs
Use the GPIO to drive outputs and read inputs
Common errors and debugging
• Python is sensetive to intendation.
• Make sure that the variables and the functions have the same
exact writing. Watch out for small and Capital letters!