Difference between revisions of "Raspberry Pi"

From Sketching with Hardware at LMU Wiki
Jump to navigation Jump to search
 
(51 intermediate revisions by 11 users not shown)
Line 3: Line 3:
 
* Raspberry Pi Zero W
 
* Raspberry Pi Zero W
 
* Raspberry Pi Zero
 
* Raspberry Pi Zero
* Raspberry Pi 400
+
* [[Raspberry Pi400]]
 
* Raspberry Pi 3 Model B
 
* Raspberry Pi 3 Model B
  
 +
= Pi Tutorial Videos =
 +
[[List of Raspberry Pi Videos]]
 +
 +
== Videos: Getting started ==
 +
* [https://www.sketching-with-hardware.org/raspi/os-setup/01_raspi-install-OS_player.html Installing the OS on am SD-Card, initial configuration including SSH]
 +
* [https://www.sketching-with-hardware.org/raspi/python-ssh/02_raspi_python_ssh_player.html Connecting to the Raspberry Pi Zero via SSH, installing gpiozero, LED and Button examples, using the nano editor]
 +
* [https://nerdytechy.com/raspberry-pi-touchscreen-setup-tutorial/ 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.
 
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.
  
Line 22: Line 31:
 
* https://randomnerdtutorials.com/raspberry-pi-web-server-using-flask-to-control-gpios/
 
* https://randomnerdtutorials.com/raspberry-pi-web-server-using-flask-to-control-gpios/
  
== Resources ==
+
== 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.
=== Pinout of Pi Zero ===
+
** [[Push button]]
physical connections
+
** [[LED]]
<br/> JL: https://peppe8o.com/raspberry-pi-zero-pinout/
 
<br/> CR: https://de.pinout.xyz/pinout/io_pi_zero
 
<br/> HW: https://www.argon40.com/learn/index.php/2020/03/06/a-comprehensive-guide-on-raspberry-pi-3-and-raspberry-pi-zero-and-zero-w-gpio-pinout/
 
 
 
=== Setting up Python ===
 
NOOBS
 
configure
 
<br/> JL: https://www.tutorialspoint.com/python/python_environment.htm
 
<br/> CR: https://learn.adafruit.com/setting-up-a-raspberry-pi-with-noobs/download-noobs
 
<br/> HW: https://www.raspberrypi.org/help/noobs-setup./
 
 
 
=== Access to GPIO ===
 
JL: http://codefoster.com/pi-basicgpio/
 
<br/> CR: https://fedoramagazine.org/raspberry-pi-zero-gpio-fedora/
 
<br/> HW: https://webnist.de/raspberry-pi-zero-gpio-pins-ueber-den-desktop-steuern/
 
<br/> SG: https://github.com/fivdi/onoff
 
 
 
=== Blinking an LED ===
 
JL: https://raspberrypihq.com/making-a-led-blink-using-the-raspberry-pi-and-python/
 
<br/> CR: https://fedoramagazine.org/raspberry-pi-zero-gpio-fedora/
 
<br/> HW: https://webnist.de/raspberry-pi-zero-gpio-pins-ueber-den-desktop-steuern/
 
<br/> SG: https://github.com/fivdi/onoff#blink-an-led-using-the-synchronous-api
 
 
 
=== Reading a Pin ===
 
JL: http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/
 
<br/> CR: https://learn.sparkfun.com/tutorials/raspberry-gpio/all
 
<br/> HW: https://mjrobot.org/rpi-gpiozero/
 
<br/> SG: https://tutorials-raspberrypi.de/raspberry-pi-gpio-erklaerung-beginner-programmierung-lernen/
 
 
 
=== Runing a Webserver that access GPIO ===
 
JL: https://towardsdatascience.com/python-webserver-with-flask-and-raspberry-pi-398423cc6f5d
 
<br/> CR: https://www.e-tinkers.com/2018/04/how-to-control-raspberry-pi-gpio-via-http-web-server/
 
<br/> HW: https://hackaday.io/project/173322-controlling-gpio-outputs-using-a-web-interface-wit
 
<br/> SG: https://randomnerdtutorials.com/raspberry-pi-web-server-using-flask-to-control-gpios/
 
 
 
=== Restful API ===
 
JL: https://sites.google.com/site/cartwrightraspberrypiprojects/home/other-projects/rest-api
 
<br/> CR: https://docs.dataplicity.com/docs/control-gpios-using-rest-api
 
<br/> HW: https://www.youtube.com/watch?v=JZfevVG-VuA&list=PLLIDdNg0t5ceg3mI3vn0YJocJ4ndMtM98&index=4&t=0s
 
<br/> SG: https://tutorials-raspberrypi.de/raspberry-pi-nodejs-webserver-installieren-gpios-steuern/
 
 
 
=== Description of the components ===
 
JL: https://www.adafruit.com/product/3411
 
<br/> CR: https://computer.howstuffworks.com/raspberry-pi2.htm
 
<br/> HW: https://learn.adafruit.com/introducing-the-raspberry-pi-zero
 
<br/> SG: https://de.wikipedia.org/wiki/Raspberry_Pi  ;)
 
 
 
== Project Ideas ==
 
 
 
=== SG ===
 
mindSat:
 
<br/>A small portable gadget. Which can record sensor data and give feedback to a user. Mind satisfaction for your offices days.
 
<br/>It’s hard to do small exercises, often we find excuses to not do it. Concentrated breathing can help your brain to relax, or focusing on small things can reduce stress. Using those informations to create short (~ 5min) exercises.
 
 
 
=== JL ===
 
Home Office Buddy:
 
<br/>A speaker communicating in a pleasant way with the target person in order to minimize a possible social isolation and encourage the keeping of important routines & daily structures in order to maintain a certain productivity during a working day.
 
<br/>For Example: Suggest unplanned short breaks if the target person is showing a lack of concentration measured by a certain level of body movement.
 
 
 
=== JP ===
 
  
=== CR ===
+
* Connect the Pi to your local network and access it from another device via SSH.
Problem: Tension due to prolonged sitting and incorrect sitting positions (e.g. crooked shoulders)
 
<br/> Sensors: Kinect for analysis of posture, sensors that measure the tension in the neck
 
<br/> The longer one maintains a bad sitting position, the older/bent an avatar becomes on the screen. Through movement the avatar becomes younger/upright again.
 
  
=== YS ===
+
=== 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".
  
=== JW ===
 
  
=== HW ===
+
[[Category:Raspberry Pi]]
Problem: Pain in the hand and wrist due to consistent movement or incorrect hand/arm position
 
<br/> Sensors: e.g. Leap Motion for motion and posture detection, keyboard/mouse to track activity (?)
 
<br/> Vibration of the mouse/keyboard if the same position was kept for too long or no pause was made. A visualization of an inflammation (red pulsating circles) is displayed, which gets worse/better depending on user behavior.  This warns the user when his hand position is worsening. The user may choose to be prevented from continuing to work or not.
 

Latest revision as of 15:35, 12 June 2024

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

Pi Tutorial Videos[edit]

List of Raspberry Pi Videos

Videos: Getting started[edit]

Introduction[edit]

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


Web server on the Raspberry Pi

Getting started Tasks[edit]

  • 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[edit]

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