introduction to raspberry pi

34
Introduction To Raspberry Pi A Presentation For The Bainbridge BARN May 15, 2016

Upload: ehrenbrav

Post on 15-Apr-2017

120 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Introduction to Raspberry Pi

Introduction To Raspberry Pi

A Presentation For The Bainbridge BARNMay 15, 2016

Page 2: Introduction to Raspberry Pi

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

Page 3: Introduction to Raspberry Pi

What Is A Raspberry Pi?

A cheap, tiny, open-source computer

Page 4: Introduction to Raspberry Pi

What Is A Raspberry Pi?

Most of us think of computers as this:

Or this:

Page 5: Introduction to Raspberry Pi

What Is A Raspberry Pi?

But computers can be much more!

...wait...I mean less!

Page 6: Introduction to Raspberry Pi

What Is A Raspberry Pi?

Page 7: Introduction to 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

Page 8: Introduction to Raspberry Pi

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

Page 9: Introduction to Raspberry Pi

What Can You Make With A Pi?

FishPi: An Autonomous Boat

Page 11: Introduction to Raspberry Pi

What Can You Make With A Pi?

RasPiLapse: A Time-Lapse Photo Dolly

Page 14: Introduction to Raspberry Pi

What Can You Make With A Pi?

Smart Garage Door Manager

Page 15: Introduction to Raspberry Pi

What Can You Make With A Pi?

A Minecraft Server

Page 16: Introduction to Raspberry Pi

What Can You Make With A Pi?

A Weather Balloon

Page 17: Introduction to Raspberry Pi

What Can You Make With A Pi?

An Automated Pet Feeder

Page 18: Introduction to Raspberry Pi

Communicating With Your Pi

Page 19: Introduction to Raspberry 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

Page 20: Introduction to Raspberry Pi

Communicating With Your Pi

Don't fear the command line!• Fast• Powerful• Robust (minimal system

resources or bandwidth)• Impress your geek friends

Page 21: Introduction to Raspberry Pi

Connecting Your Pi To The Outside World

Page 22: Introduction to Raspberry Pi

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

Page 23: Introduction to Raspberry Pi

Connecting Your Pi To The Outside World

Connect a LED light...

<yawn>...

Page 24: Introduction to Raspberry Pi

Connecting Your Pi To The Outside World

Connect a button...

Page 25: Introduction to Raspberry Pi

Connecting Your Pi To The Outside World

Switch other hardware on or off...

Page 26: Introduction to Raspberry Pi

Connecting Your Pi To The Outside World

Control motors, servos, and steppers...

Page 27: Introduction to Raspberry Pi

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...

Page 28: Introduction to Raspberry Pi

Connecting Your Pi To The Outside World

Best of all, control other hardware through the I2C or SPI interfaces

Page 29: Introduction to Raspberry Pi

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:

Page 30: Introduction to Raspberry Pi

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

Page 31: Introduction to Raspberry Pi

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!

Page 32: Introduction to Raspberry Pi

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!

Page 33: Introduction to Raspberry Pi

I Have My Pi Working...Now What?

• Finally, for some neat tutorials on how to use your Raspberry Pi

• Get these here!

Page 34: Introduction to Raspberry Pi

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!!!!