Intro to Raspberry Pi
Please see newer version of this outline. Some content below is out of date.
Arduino vs. Raspberry Pi
Both are very flexible, with great documentation and community.
Arduino:
- microcontroller, 8-bit, tiny memory
- very simple, solid, reliable
- very low power consumption
- do one thing really well
Raspberry Pi:
- Single board computer, 32/64-bit CPU, 512MB - 4GB RAM
- Connect: USB, Ethernet, Wifi, Bluetooth
- Output: Video (HDMI), audio (HDMI, 3.5mm jack), GPIO pins
- Full operating system
- Use high-level programming languages (mainly Python)
- can do MUCH more than Arduino, but…
- consumes much more power and requires steady power supply
- OS requires updates
- less reliable overall
e.g. poemBot
Raspberry Pi starter kit
- Boards (A, B, Zero, Compute, spec chart)
- Power supply (you need a good one! A rainbow icon shows up on screen if power goes low)
- SD card (try to get decent quality, high read/write speed, “SDHC, Class 10 / UHS 3”, min 8GB)
- Console cable
- Keyboard, mouse, HDMI cord
- add ons / HATs
- ribbon cable + breadboard
Get Started
First step is to choose an OS for your Pi and burn it to your SD card. See official step-by-step for a visual walk through. Most likely you will want to start with NOOBS (does not require burning image) or an image of Raspbian:
NOOBS
- NOOBS is an automatic Pi OS installer designed to be super simple
- Download NOOBS, unzip, copy to SD card (you do NOT burn an image, just copy)
- Plugin SD, connect video, keyboard, and power to Pi
- Follow instructions!
Burn image to SD
- See Burn ISO note
- Download Raspbian (headless or desktop) (Linux distro for Pi, based on Debian, see Intro to Linux note)
- SD Formatter
- Etcher
- Plug SD into Pi, boot up!
- see Raspbian docs
Use Pi
- GUI (i.e. plugin HDMI, this is often easiest way to get started, even if you are planning to go headless)
- console cable (can be handy for developing headless projects, can provide power to the board)
- SSH (not possible on university wifi)
ssh pi@ip.address
- enable on Pi
- find IP address
- use SSH
- copy files to Pi:
scp filename pi@ip.address:~/destination/foldername/
- copy files from Pi:
scp pi@ip.address:~/source/file /destination/directory/
- VNC (virtual desktop)
- enable/install on Pi
- install client, use cloud service
- Tip: plug SD into computer to directly edit file system!
/etc/rc.local
file runs at boot, so you can add command line calls to start your program
Resources
- Offical Raspberry Pi Documentation, Help, and Forum
- Adafruit Learn, pi category
- Play around to learn more: Volumio music center, RetroPi