introduction to raspberry pi
TRANSCRIPT
Introduction To Raspberry Pi
A Presentation For The Bainbridge BARNMay 15, 2016
About Me
Tech enthusiast; hardware and software hacker; particular interest in machine learning
Pros:This presentation is free of charge!
Cons:No training in computer science, embedded systems design, electrical engineering, software development
What Is A Raspberry Pi?
A cheap, tiny, open-source computer
What Is A Raspberry Pi?
Most of us think of computers as this:
Or this:
What Is A Raspberry Pi?
But computers can be much more!
...wait...I mean less!
What Is A Raspberry Pi?
What Is A Raspberry Pi?• Costs about $35• Runs linux as its operating system• Basic ports for USB, monitor, and internet• Wifi and BlueTooth• GPIO pins you can use to connect to other
devices
Why Are People So Excited About The Raspberry Pi?
• Cheap and Simple – Enables you to easily add a brain to your project
• Powerful – You can run surprisingly demanding applications on a Pi
• Open Source – Get all source code, schematics, and data sheets for free
• Learning Tool – Learn hardware, linux, and programming all at once
What Can You Make With A Pi?
FishPi: An Autonomous Boat
What Can You Make With A Pi?
Pandora's Box: An Internet Radio Player
What Can You Make With A Pi?
RasPiLapse: A Time-Lapse Photo Dolly
What Can You Make With A Pi?
WeatherPi: A Solar-Powered Weather Station
What Can You Make With A Pi?
Dumb Wired Printer → Wifi Printer
What Can You Make With A Pi?
Smart Garage Door Manager
What Can You Make With A Pi?
A Minecraft Server
What Can You Make With A Pi?
An Automated Pet Feeder
Communicating With Your Pi
Communicating With Your Pi
Two basic methods:• Directly plug in a keyboard and monitor
• Good for initial setup, but inconvenient
• Over the network via ssh• Much better, but...• You need to know how to use ssh
Communicating With Your Pi
Don't fear the command line!• Fast• Powerful• Robust (minimal system
resources or bandwidth)• Impress your geek friends
Connecting Your Pi To The Outside World
Connecting Your Pi To The Outside World
• The simplest way is using wifi, BlueTooth or USB – your Pi already has these built in
• But for devices that can't communicate this way, use the GPIO (General Purpose Input and Output) pins
Connecting Your Pi To The Outside World
Connect a LED light...
<yawn>...
Connecting Your Pi To The Outside World
Connect a button...
Connecting Your Pi To The Outside World
Switch other hardware on or off...
Connecting Your Pi To The Outside World
Control motors, servos, and steppers...
Connecting Your Pi To The Outside World
Yeah, that’s right – now we’re talking robotics!!!
* Important Disclaimer: Raspberry Pis were probably not used to make these robots...
Connecting Your Pi To The Outside World
Best of all, control other hardware through the I2C or SPI interfaces
Connecting Your Pi To The Outside World
• Thermometers
• Pressure sensors
• Ultrasonic sensors
• Accelerometers
• RFID Readers
• Gyroscopes
• Photocells
• Magnetometers
• Altimeters
• Etc, etc...
Stuff you can control via I2C and SPI:
I Have My Pi Working...Now What?
• The hardest part: learning linux• But once you know the basics, you'll discover
how insanely powerful it is
• Start here and here!
• You can always get help from your friends at the BARN
I Have My Pi Working...Now What?
• To make your Pi do useful stuff, you'll probably want to know some programming
• Python is an excellent place to start, since it is widely used, easy to learn, and powerful
• Start here!
I Have My Pi Working...Now What?
• If you want to use the GPIO pins, you'll need to know a little about hardware
• Start here!
I Have My Pi Working...Now What?
• Finally, for some neat tutorials on how to use your Raspberry Pi
• Get these here!
OK Let's Get It Working!1. Boot your Pi and get logged in
a. Plug in your keyboard, mouse, and monitor - we’ll use the GUI for now...b. Your default credentials are username: pi password: raspberryc. Open the terminal and enter `passwd` to change the password!!
2. Connect to the interneta. Connect to the BARN wifi.b. In the terminal enter `ping google.com` to configm we’re on the netc. Hit CTRL-C when confirmed
3. Update your entire systema. In the shell, execute `sudo aptitude update` to get the list of the latest softwareb. `sudo aptitude full-upgrade` to actually perform the update
4. Americanize your Pia. Run `sudo raspi-config`b. In Internationalization Options, change Locale to en_US.UTF-8,, Keyboard-Layout,
Timezone, and Wi-Fi country to the US
5. Set up SSH so you can log in without hooking up a keyboard and monitora. Get your IP address with `hostname -I` and make a note of thisb. From another computer, try to log in to your pi with `ssh pi@<your-pi’s-IP-address>`
6. When ready, shutdown your pi with `sudo shutdown -h now`
7. [Note to self - fill in Step 7 when time permits.]
8. Massive profit!!!!