Configure network settings on the Raspberry Pi
Define a static IP address and Wi‑Fi credentials using Netplan.
For reliable communication between your development computer and the robot you may want to assign a static IP address and configure Wi‑Fi credentials. The Pi uses Netplan for network management. Edit the configuration and apply it, then verify connectivity.
bash
sudo nano /etc/netplan/50-cloud-init.yaml
Adjust the file to specify your network settings. For example:
network:
version: 2
wifis:
wlan0:
dhcp4: false
addresses: [192.168.1.n/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
access-points:
"robot_overlord_wifi":
password: "YourWiFiPassword"
"RoseCityRobotics":
password: "YourOtherPassword"
Replace n in the IP address with your robot number (e.g., 192.168.1.10 for robot 10). Configure multiple access points if your robot moves between different Wi‑Fi networks. Save the file and exit the editor.
bash
sudo netplan apply
bash
hostname -I
hostname
ping -c 3 google.com