Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Arnov Sharma
Published © MIT

Wi-Fi Status Box

A Wi-Fi indicator that signals if the Internet is working or not.

BeginnerFull instructions provided1 hour480
Wi-Fi Status Box

Things used in this project

Software apps and online services

Fusion
Autodesk Fusion
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Fusion360File

Schematics

Main Board SCH

Power Board SCH

Code

code

C/C++
#include <WiFi.h>
#include <Adafruit_NeoPixel.h>
#define LED_PIN D0          // GPIO pin connected to the LEDs
#define NUM_LEDS 4         // Number of WS2812B LEDs
#define WIFI_SSID "Ur SSID"      // Replace with your WiFi SSID
#define WIFI_PASSWORD "Ur PASS"  // Replace with your WiFi Password
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(115200);
strip.begin();
strip.show(); // Initialize all pixels to 'off'
// Connect to Wi-Fi
Serial.print("Connecting to WiFi...");
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
int attempts = 0;
while (WiFi.status() != WL_CONNECTED && attempts < 20) {
delay(500);
Serial.print(".");
attempts++;
}
if (WiFi.status() == WL_CONNECTED) {
Serial.println("Connected to WiFi");
} else {
Serial.println("Failed to connect to WiFi");
}
}
void loop() {
if (WiFi.status() == WL_CONNECTED) {
setLEDColor(strip.Color(0, 255, 0)); // Green
} else {
setLEDColor(strip.Color(255, 0, 0)); // Red
}
delay(10000); // Check the connection every 10 seconds
}
void setLEDColor(uint32_t color) {
for (int i = 0; i < NUM_LEDS; i++) {
strip.setPixelColor(i, color);
}
strip.show();
}

Credits

Arnov Sharma
341 projects • 349 followers
I'm Arnov. I build, design, and experiment with tech—3D printing, PCB design, and retro consoles are my jam.
Contact

Comments

Please log in or sign up to comment.