Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Sensing RealitiesRaspberry Pi
RPi
Single-board computers devoloped in the United Kingdom by the Raspberry Pi Foundation (founded in 2009)
Build for teaching computer sience
$25 - $35
Sensing RealitiesRaspberry Pi
RPi Introduction
What is a Raspberry Pi?https://www.raspberrypi.org/help/what-is-a-raspberry-pi/
Sensing RealitiesRaspberry Pi
Sensing RealitiesBasic Unix Commands
src: https://en.wikipedia.org/wiki/Raspberry_Pi#/media/File:Raspberry_Pi_2_Model_B_v1.1_top_new_(bg_cut_out).jpg
RPi 2 model B
Operating SystemsLinux (e.g. Raspbian, Noobs), RISC OS, FreeBSD, NetBSD, Plan 9, Inferno, AROS Windows 10 IoT Core[4] and additional distributions of Linux such as Ubuntu
CPU900 MHz quad-core ARM Cortex-A7
Memory1 GB RAM
Storage MicroSDHC slot
Graphics Broadcom VideoCore IV
Power 5V over micro USB
Sensing RealitiesRaspberry Pi
Sensing RealitiesRaspberry Pi
RPi References
~https://www.raspberrypi.org/documentation/https://www.raspberrypi.org/help/
Specificationshttps://en.wikipedia.org/wiki/Raspberry_Pi#Specifications
Sensing Realities
Microcontroller vs. Microprocessor
Arduino vs Raspberry Pihttps://www.youtube.com/watch?v=M9n-Csmpq7U
GPIO17 of the 26 pins are GPIO pins; the others are power or ground pins.https://www.raspberrypi.org/documentation/usage/gpio/
Interactive Pinout Diagramhttp://pi.gadgetoid.com/pinout
Raspberry Pi
Sensing Realities
Get startedhttps://www.raspberrypi.org/help/quick-start-guide/
The default login for Raspbian is:
username: pi password: raspberry.
Raspberry Pi
DIY insprirations
hackadayhttp://hackaday.com
instructableshttp://www.instructables.com
Sensing RealitiesRaspberry Pi
Sensing Realities
Python
~https://www.python.orghttps://www.raspberrypi.org/documentation/usage/python/README.md
Hello World!
#!/usr/bin/pythonprint “Hello, World!“
Raspberry Pi
Sensing Realities
Lighting up an LED
import RPi.GPIO as GPIO # Import GPIO libraryGPIO.setmode(GPIO.BOARD) # Use board pin numberingGPIO.setup(7, GPIO.OUT) ##Setup GPIO Pin 7 to OUTGPIO.output(7,True) #Turn on GPIO pin 7
Raspberry Pi