Silly Wireless AP Monitor With ESP8266 and OLED Display

by arduinocelentano in Circuits > Gadgets

1305 Views, 12 Favorites, 0 Comments

Silly Wireless AP Monitor With ESP8266 and OLED Display

intro.JPG
Silly Space Invaders Dashboard(SSID): an IoT Gadget for Wireless Connectivity Testing Using ESP8266 and OLED Display

What if monitoring your wireless signal quality could be as fun as a classic arcade game? Meet the Silly Space Invaders Dashboard (SSID), an IoT device that helps you defend your wireless galaxy from the aliens! On this weird dashboard, you'll see a fleet of cosmic invaders, each symbolizing an access point. The closer they are to the bottom of the display, the stronger their signal is.

You can use it as an IoT desktop gadget or turn it into a quirky smartwatch to explore the cosmic frontiers of connectivity.

🔗 If you are interested in retro space shooters, you may also like my LCD Invaders game.

Supplies

ingredients.JPG
  1. ESP8266 development board
  2. SSD1306 128x64 I2C OLED display
  3. PlatformIO IDE

I used a board with an embedded OLED display. Various versions of such boards are sold everywhere under different brands.

⚠️ The two boards I tested were marked HW-364A and HW-630. They had slightly different hardware; in particular, they used different pins for the OLED display, so check that carefully.

Visual Design

design.gif

The visual design is inspired by retro games, like Space Invaders, Galaxian, Galaga and other cosmic shooters. Initially, I was wondering whether one could freely use the original assets, but apparently, Taito Corporation does not want us to use their monsters in our fun projects without their permission (correct me if I am wrong). So I designed a custom set of monochrome sprites and movement patterns.

Implementation

Diagram1.png

There are two key subroutines that handle all the logic.

The scanResults() function processes the revealed wireless networks. It divides them into groups by their signal strength (RSSI). Each group corresponds to a row of invaders. For each access point, it creates an instance of the Invader class, which stores the SSID, character appearance, and coordinates. If an access point is not encrypted, it has a unique appearance regardless of signal strength.

The update_oled() function renders one frame of animation. It draws the signal indicator to the left and the AP names at the upper edge of the display. They are usually shortened due to limited space. The characters move randomly in the center, and sometimes you will notice a laser cannon at the bottom, which points to a free Wi-Fi access point. There is also a "radar" circle animation, just for fun.

Preparing the Environment

platformio.png
platformio-open.png

Go to https://platformio.org/platformio-ide and follow the installation instructions.

In PlatformIO IDE click "Clone GIT repository" and paste the following URL:

https://github.com/arduinocelentano/ssid

PlatformIO should automatically download the project and the libraries it depends on.

Tuning the Code

platformio-header.png

Open the config.h file and set up the settings if needed. In particular, you should change OLED_SDA and OLED_SCL according to your board. I have provided detailed comments on the other options you might want to tune.

Building and Uploading the Firmware

platformio-build.png
001.JPG

Press Platformio:Build and then Platformio:Upload button to upload the code.