I have recently been carrying my Raspberry Pi back and forth between my home and my local hack space - BuildBrighton.

Both places have WiFi and with a Raspberry Pi A+ missing an ethernet port, you need to ensure you can access the Pio to do any sort of development (and I can’t always guarantee a HDMI compatible display will be available).

It’s fairly easy and isn’t restricted to just two - you can add as many WiFi networks as you wish. All you need to know is the SSID and password.

With access to the Pi, edit the following file with sudo access:

$ sudo nano /etc/network/interfaces

It should look something like this:

auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface location1 inet dhcp
iface location2 inet dhcp

If your internet is working, there is no need to tweak too much. The most important lines are the last few

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface location1 inet dhcp
iface location2 inet dhcp

#neural networks

Use a Raspberry Pi with multiple WiFi networks
6.05 GEEK