The Raspberry Pi Pico WH has two wifi modes: station mode (STA) and access point(AP) mode. we will use the STA mode to detect and display available networks. Make a simple wifi scanner usinfg raspberry pi pico wh and MicroPython to scan Wi-Fi networks in station mode (STA) and display signal strength on a small SSD1306 OLED screen.
- Raspberry Pi Pico WH
- SSD1306 OLED Module (Amazon link: Ds Robotics® 0.96" OLED Display)
- Breadboard & Jumper Wires
- Thonny IDE
- MicroPython drivers (preloaded or installable)
- Connecting the Pico WH:
- Press and hold
BOOTSEL
button on the board, connect USB to PC and launchThonny
.
- Press and hold
- Files window:
- If the files window is not there, go to
View
then click 'Files`.
- If the files window is not there, go to
- Configure the Interpreter:
- Go to
Run > Configure Interpreter
. - Set the interpreter settings (follow image below).
- Go to
- Open Thonny, go to
Tools > Manage packages...
- Search and install
ssd1306
module.
If unavailable, use the drivers i have in the files in
/lib/
directory of this repository. If the display is not working or turming on, there's a complete troubleshooting guide to solve or test the display insid Thonny.
Connect your OLED to the pico as follows:
Raspberry Pi Pico WH | SSD1306 OLED |
---|---|
VBUS (Pin 40) or 3V3 (Pin 36) | VCC |
GND (Pin 38) | GND |
GP4 (Pin 26) | SDA (Data Line) |
GP5 (Pin 27) | SCL (Clock Line) |
I have uploaded a full debug guide in the troubleshooting section if your display is not turning on.
- Script:
main.py
(available in this repo) - Save it to the pico in
/main.py
directory.
Run and verify using Thonny. If it prints "MPY: soft reboot"
, everything is good to go! Disconnect and power the board externally. (It should run automatically.)
-save in the following paths only:
- -Raspberry Pi Pico/main.py
- -Raspberry Pi Pico/lib/ssd1306.py
Maintained by PS-003R32.
You can open Issues or Pull Requests for suggestions or improvements! ;)