Connect Pico to Wifi

Aug 2026

Introduction

A very common activity for a Raspberry Pi Pico is to connect it to the Internet via WiFi (it has to be a Pico 1/2 'W' variant for this to work' Because a Pico does not have an OS of sorts, there is no built in UI to use to connect to WIFI, so we have to do this using a script.
Now, you can do this at boot, but if you lose WIFI you might need to reboot. You could define a function that you call every say 6 hours to connect to the WIFI so you know it is always connected. Or you could use a button to force connection when you press it.
After this, your main issue is working out what IP Address the Pico now has. That is something we could solve with say a small LCD Screen.

WIFI Script