🌐 Connecting RPi to WiFi
To connect your Raspberry Pi to the internet, you will need to modify the 30-wificfg.yaml file.
Open a terminal on the backseat and open the file:
sudo nano /etc/netplan/30-wificfg.yaml
Any mistyped characters or any extra spaces will break the network connections. If this occurs, you may not be able to SSH into your Raspberry Pi, so please follow these instructions very carefully.
When you open this file, it will look something like this:
network:
version: 2
wifis:
renderer: networkd
wlan0:
access-points:
HOME_WIFI:
password: YOUR_SUPER_SECRET_PASSWORD
CAFE_WIFI:
password: THEIR_SUPER_SECRET_PASSWORD
dhcp4: true
optional: true
To add your home WiFi network, change HOME_WIFI to the name of your home WiFi network.
Also change YOUR_SUPER_SECRET_PASSWORD to your home WiFi network's password.
You can add multiple WiFi networks to this file, so if you have a cafe WiFi network, you can add it as well.
Before closing your file, please ensure that the new lines have the same number of spaces and no incorrect characters. If there are, you may not be able to SSH into your RPi and the TAs must fix it in class.
Once you are sure that your file has no formatting mistakes, apply the netplan. This will likely close your SSH connection.
At the bottom of the terminal, there will be instructions to save and close the file.
It should appear like CTRL or CMD + S to save the file and CTRL or CMD + X to close the file.
To apply your changes:
sudo netplan apply