Remote-controlled RGB mood light
Warm, cool, rainbow or breathing: cycle lighting moods from your sofa.
Shop by category
Shop all componentsThe 1.3-inch 128x64 OLED looks like the common 0.96-inch one but uses an SH1106 controller, so SSD1306 libraries show a shifted picture. U8g2 has a proper SH1106 driver. The ESP32 scans every five seconds and lists the six strongest networks with their channel and a signal bar, which helps you pick a clear channel for your router.
Tick anything you already have and the total updates.
1.3-inch 128x64 SH1106 I2C OLED
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB power bank for a pocket tool.
wifi_scanner.inoVerify & upload in Electrolark#include <WiFi.h>
#include <U8g2lib.h>
U8G2_SH1106_128X64_NONAME_F_HW_I2C oled(U8G2_R0, U8X8_PIN_NONE);
void setup() {
oled.begin();
WiFi.mode(WIFI_STA);
WiFi.disconnect();
}
void loop() {
int n = WiFi.scanNetworks(); // results come sorted by RSSI
oled.clearBuffer();
oled.setFont(u8g2_font_5x8_tf);
oled.setCursor(0, 7); oled.printf("%d networks", n);
for (int i = 0; i < n && i < 6; i++) {
int y = 17 + i * 9;
int bars = constrain(map(WiFi.RSSI(i), -95, -40, 1, 20), 1, 20);
oled.setCursor(0, y); oled.printf("%2d", WiFi.channel(i));
oled.drawBox(14, y - 6, bars, 5);
oled.setCursor(38, y); oled.print(WiFi.SSID(i).substring(0, 17));
}
oled.sendBuffer();
WiFi.scanDelete();
delay(5000);
}
That is an SSD1306 driver on an SH1106 screen; use the U8G2_SH1106 constructor as in the sketch.
Some 1.3-inch modules have VCC and GND swapped on the header; check the labels.
That is normal; they still count as busy channels.
No, the classic ESP32 only has 2.4 GHz Wi-Fi.
Yes, from a power bank or a LiPo with a charger module.
Yes, it only listens to the public network names that routers broadcast.
4 parts: ESP32-WROOM-32 38-Pin Development Board, 1.3 inch 128x64 SSD1106 Controller I2C Serial Communication OLED Display - White Color Screen, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a beginner project and takes about 45 minutes. The build on this page has 5 steps.
No. This page has the complete, tested code (wifi_scanner.ino).
About ₹862 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
SH1106 vs SSD1306 OLED controllers; Using the U8g2 library; Wi-Fi scanning and RSSI.
Warm, cool, rainbow or breathing: cycle lighting moods from your sofa.
Press to roll: the pips tumble and slow down before landing on a number.
Wait for the light, hit the button: how many milliseconds can you beat?
A bright 4-digit clock that keeps time through power cuts.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.