Repository for the raspberry lessons
Welcome! The Raspberry Pi (RPi) is a great tool to empower your creativity. Discover the multiple possibilities this single board computer brings to you.
Interactive link https://doc.clickup.com/36177258/d/h/12g1ba-160/beb602325a60716
You could use the following table to quickly compare two versions of the RPi.
Raspberry Pi 3 Model B | Raspberry Pi 4 Model B |
---|---|
Broadcom BCM2837 | Broadcom BCM2711 |
Quad-Core 64bit @ 1.2GHz | Quad-core 64bit @ 1.5GHz |
Cortex A53 (ARM v8) | Cortex A72 (ARM v8) |
1GB LPDDR2 SDRAM | 2GB, 4GB or 8GB LPDDR4 |
100 Base Ethernet | Gigabit Ethernet |
Official page | Official page |
A great advantage about RPi is that you can interact with the hardware. Also, consider using a hat for this purpose.
The image is of the RPi 3, but it applies to the RPi 4. More details https://medium.com/youngwonks/raspberry-pi-3-pinout-50b904ed41f0
More details https://pinout.xyz/
# https://gpiozero.readthedocs.io/en/stable/installing.html
sudo apt update
sudo apt install python3-gpiozero
pinout
Take note of the white pins. More details https://projects.raspberrypi.org/en/projects/physical-computing/1
For older versions
Basic elements
There are two options; please make sure to have one of the following options.
Get the ip of the raspberry from the powershell
ping raspberrypi.local -4
raspberrypi.local
shutdown now
You can also connect via
ssh pi@raspberrypi.local
sudo raspi-config nonint do_wifi_country MX
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
f
Add network configuration
Wireless network wpa_passphrase "network_name"
network={
ssid="network_name"
scan_ssid=1
psk=e647e6a0df46537ad98c7687fa75fa33f0e0489f80fec9ed0180058647724073
}
PEAP network echo -n "plaintext_password" | iconv -t utf16le | openssl md4
network={
ssid="<<network_name>>"
priority=1
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
auth_alg=OPEN
eap=PEAP
identity="<<user_name>>"
password=hash:<<the_hash>>
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
}
sudo reboot
python
from gpiozero import LED
led = LED(14)
led.on()
led.off()
exit()
python blink_simple.py
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
Then you can start the service with
node-red-start
More details at https://nodered.org/docs/getting-started/raspberrypi
https://github.com/raspberrypilearning/physical-computing-guide/blob/master/pull_up_down.md
https://gpiozero.readthedocs.io/en/stable/
htop