RaspberryPi SS15
RaspberryPi SS15
Michael Joy
What will we be doing today?
First Half:
• Learn about the Raspberry Pi
• See demos of what the Pi can do
• Short break
Second Half:
• Setup the Raspberry Pi
• Learn how to use the command line
• See demos of the Pi Camera
• Learn how to use Python to interact with the Pi Camera
What is the Raspberry Pi?
• Affordable credit-card sized computer
• Plugs into a computer monitor or TV
• Uses standard keyboard and mouse
• Can browse the internet and play HD video
• Can also interact with the outside world!
Raspberry Pi Foundation
Educational charity based in the UK
The Foundation’s goal is to advance the education of
adults and children in the field of computers, computer
science, and related subjects.
https://www.raspberrypi.org/about
Why was the Pi created?
Concern over the decline in computer literacy
• In the 1990s most new Computer Science students
were experienced hobbyist programmers.
• The 2000s were very different; a typical applicant may
have only done a little web programming.
Your Raspberry Pi
Raspberry Pi 2 Model B Camera Kit
Camera Kit Contents
Raspberry Pi 2 B Micro SD Card WiFi Dongle
George Sparrow
Hands-On: Assembling the Pi
Setup your Raspberry Pi components in front of you
Login: pi
Password: raspberry
Hands-On: Configuring the Pi
Configuring the Raspberry Pi for the first time
Launch the Raspberry Pi Configuration Tool
~$ sudo raspi-config
Hands-On: Configuring the Pi
Setting the keyboard layout
1. Choose option 4 Internationalization Options
Hands-On: Configuring the Pi
Setting the keyboard layout
2. Choose option I3 Change Keyboard Layout
Hands-On: Configuring the Pi
Setting the keyboard layout
3. Choose an appropriate US keyboard type
Hands-On: Configuring the Pi
Setting the keyboard layout
4. Choose English (US) for keyboard layout
Hands-On: Configuring the Pi
Setting special command keys for the keyboard
5. Choose the default for the keyboard layout
Hands-On: Configuring the Pi
Setting special command keys for the keyboard
6. Select No for the Control+Alt+Backspace command
Hands-On: Configuring the Pi
Enabling the camera socket
7. Choose option 5 Enable Camera
Hands-On: Configuring the Pi
Enabling the camera socket
8. Select Enable
Hands-On: Configuring the Pi
Optional: Set to automatically boot to GUI
9. Choose option 3 Enable Boot to Desktop/Scratch
Hands-On: Configuring the Pi
Optional: Set to automatically boot to GUI
10. Select Log in as user ‘pi’ at the graphical desktop
then select Ok
Hands-On: Configuring the Pi
Exit the configuration tool
11. Select Finish
Hands-On: Configuring the Pi
Exit the configuration tool
12. Select Yes if prompted to reboot
Hands-On: WiFi Setup
Login: pi
Password: raspberry
~$ ifconfig
Hands-On: WiFi Setup
Confirm that the WiFi dongle has been detected
3. You should see wlan0 in the list
4. You can close the terminal by typing exit and pressing
ENTER if wlan0 is in the list
Hands-On: WiFi Setup
Connect to ND-Guest
5. Click the menu button find Preferences
6. From Preferences select WiFi Configuration
Hands-On: WiFi Setup
Connect to ND-Guest
7. Click the Scan button
8. Double click ND-Guest from the list
Hands-On: WiFi Setup
Connect to ND-Guest
9. Click on the Add button
without making any
changes to ND-Guest
Hands-On: WiFi Setup
Connect to ND-Guest
10. Make sure ND-Guest
is the selected network
11. Click the Connect button
Hands-On: WiFi Setup
The Wifi connection should now be working
The WiFi Configuration Tool will be running in the
background. You might see it in the top right corner
of your screen.
Hands-On: The Command Line
The command line gives you more control
Click on the LXTerminal button in the top left menu bar.
This will give you access to a console that can do
everything the GUI can and more.
Hands-On: The Command Line
Learning how to use the command line
As we go through the command line lesson you can also
have your file system opened in the GUI so you can see
some of the changes we make.
Hands-On: The Command Line
Learning how to use the command line
You may have already used a few different commands
during this presentation.
~$ sudo raspi-config
~$ startx
~$ ifconfig
~$ wget https:/www.dropbox.com/s/
pLmz498wo3kgnpj/ss2015.tar
Hands-On: The Command Line
Updating the Raspberry Pi
You downloaded a type of archive called a tar file. To
extract the contents of the tar file into your current
directory, use the following command:
~$ cat update-script.sh
Hands-On: The Command Line
Updating the Raspberry Pi
Try to run the shell script by typing the following:
~$ ./update-script.sh
~$ ./update-script.sh
Mike Reece
Hands-On: The Command Line
Installing the Python Pi Camera module
To install this module type the following:
Michael Joy
Hands-On: Python and PiCamera
Getting exposed to Python programming
Python is a fun and easy to learn programming language
with wide use in the professional development world.
Thank You!