Raspberry Pi
Jump to navigation
Jump to search
There are different version of the Raspberry Pi https://www.raspberrypi.org/, e.g.
- Raspberry Pi 4 Model B
- Raspberry Pi Zero W
- Raspberry Pi Zero
- Raspberry Pi400
- Raspberry Pi 3 Model B
Contents
Pi Tutorial Videos
List of Raspberry Pi Videos
Videos: Getting started
- Installing the OS on am SD-Card, initial configuration including SSH
- Connecting to the Raspberry Pi Zero via SSH, installing gpiozero, LED and Button examples, using the nano editor
- Raspberry Pi touchscreen setup and calibration tutorial
Introduction
The Raspberry Pi is a Linux computer that has a multitude of connectors and in particular, it provides GPIO pins. The connector (HAT) provides an easy way to add your own sensors and actuators and there are many boars that can be connected.
Audio input and output are not very good, hence we recommend using a USB Sound Adapter (the 5€ versions work very well).
For programming, we will use python.
For controlling the Pins on the Raspberry Pi, you may want to look at the following library
- RPi.GPIO https://pypi.org/project/RPi.GPIO/
- Examples of RPi.GPIO https://sourceforge.net/p/raspberry-gpio-python/wiki/Examples/
- gpiozero access to GPIO https://gpiozero.readthedocs.io/en/stable/
Web server on the Raspberry Pi
- https://towardsdatascience.com/python-webserver-with-flask-and-raspberry-pi-398423cc6f5d
- https://randomnerdtutorials.com/raspberry-pi-web-server-using-flask-to-control-gpios/
Getting started Tasks
- Connect the two LEDS and a button to the Pi. Write a program that changes LED states (on/off) when the button is pressed.
- Connect the Pi to your local network and access it from another device via SSH.
Troubleshooting
- If updating the Pi fails during its setup wizard (first start of the Pi), you might have to extend your file partition. The wizard interrupts with a "not enough space" error. You can find this option via "sudo raspi-config", select advanced options and expand the filesystem. After a reboot, you should have access to the whole SD card (you can check disk space with "df -h"). Make sure to finish the update with "sudo apt-get update && sudo apt-get upgrade".