Difference between revisions of "Raspberry Pi"
Line 40: | Line 40: | ||
=== Reading a Pin === | === Reading a Pin === | ||
+ | JL: http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/ | ||
=== Runing a Webserver that access GPIO === | === Runing a Webserver that access GPIO === |
Revision as of 12:59, 18 November 2020
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 Pi 400
- Raspberry Pi 3 Model B
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/
Contents
Resources
Pinout of Pi Zero
physical connections
JL: https://peppe8o.com/raspberry-pi-zero-pinout/
Setting up Python
NOOBS
configure
JL: https://www.tutorialspoint.com/python/python_environment.htm
Access to GPIO
JL: http://codefoster.com/pi-basicgpio/
Blinking an LED
JL: https://raspberrypihq.com/making-a-led-blink-using-the-raspberry-pi-and-python/
Reading a Pin
JL: http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/