In this tutorial you will learn how to modify the IP address of the MRPiZ robot.
The default IP address is 192.168.42.1
-
Open the interfaces file with the nano editor :
$ sudo nano /etc/network/interfaces
-
Change the line of the IP address :
iface wlan0 inet static address 192.168.42.1 netmask 255.255.255.0
- If you want the 192.168.42.2 address for example, the configuration of the file becomes:
iface wlan0 inet static address 192.168.42.2 netmask 255.255.255.0
After editing this file you can exit the nano editor.
-
Then open the rc.local file :
$ sudo nano /etc/rc.local
-
Edit the following line with your IP address :
ifconfig wlan0 192.168.42.1
With the previous example, it becomes :
ifconfig wlan0 192.168.42.2
- Save the change and restart the Raspberry Pi Zero board :
$ sudo reboot
That’s it, the IP address is modify, do not forget to connect with this new address.
