Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RGB Busy Sign

A simplified WiFi-controlled RGB LED busy sign built with ESP32. Perfect for indicating your availability status in offices, streaming setups, or home workspaces.

✨ Features

  • Simple HTTP Control: Send color commands via HTTP GET requests
  • Hardcoded WiFi: No setup required - just edit credentials in code
  • Local HTML Interface: Beautiful web-based color picker that runs locally
  • Digital RGB LED: On/off control for red, green, and blue channels
  • Hex Color Support: Direct hex color input (e.g., #FF0000 for red)
  • Live Preview: See colors in your browser before sending to device
  • Auto-Reconnection: Automatically reconnects to WiFi if connection is lost

🔧 Hardware Requirements

  • ESP32-WROVER-E development board
  • 1x RGB LED strip with common anode configuration
  • Jumper wires
  • Breadboard (optional)
  • 5V power supply (for high-power LEDs, optional)

📋 Quick Setup

  1. Edit WiFi Credentials: Open rgb_busy_sign/rgb_busy_sign.ino and update:

    const char* ssid = "YOUR_WIFI_SSID";
    const char* password = "YOUR_WIFI_PASSWORD";
  2. Hardware: Follow the WIRING_GUIDE.md for detailed connection instructions

  3. Upload Code: Upload rgb_busy_sign/rgb_busy_sign.ino to your ESP32 using Arduino IDE

  4. Get IP Address: Open Serial Monitor (115200 baud) to see the device's IP address

  5. Open Control Interface: Open index.html in your web browser

  6. Enter IP Address: In the HTML interface, enter your ESP32's IP address

  7. Control Colors: Use the digital color buttons to control your sign!

🌐 Usage

HTTP API

The ESP32 listens for simple HTTP GET requests:

http://ESP32_IP_ADDRESS/?color=#RRGGBB

Examples:

  • Red: http://192.168.1.100/?color=#FF0000
  • Green: http://192.168.1.100/?color=#00FF00
  • Blue: http://192.168.1.100/?color=#0000FF
  • Yellow: http://192.168.1.100/?color=#FFFF00
  • Off: http://192.168.1.100/?color=#000000

Note: This implementation uses digital control - each color channel is either fully ON (255) or OFF (0).

Web Interface

The included index.html file provides:

  • IP Address Input: Enter your ESP32's IP address (saved automatically)
  • Individual Channel Controls: Toggle red, green, blue channels independently
  • Digital Color Combinations: One-click access to 8 common color combinations
  • Live Visual Feedback: See your color selection highlighted
  • HTTPS Warning: Alerts when mixed content issues may occur

Command Line Examples

You can also control the sign from command line:

# Set to red
curl "http://192.168.1.100/?color=#FF0000"

# Set to green
curl "http://192.168.1.100/?color=#00FF00"

# Turn off
curl "http://192.168.1.100/?color=#000000"

🎨 Available Digital Colors

This implementation supports 8 digital color combinations:

Color Hex Code RGB State Typical Use
Red #FF0000 R:ON G:OFF B:OFF Busy/Do Not Disturb
Green #00FF00 R:OFF G:ON B:OFF Available/Free
Blue #0000FF R:OFF G:OFF B:ON In Meeting
Yellow #FFFF00 R:ON G:ON B:OFF Away/Break
Magenta #FF00FF R:ON G:OFF B:ON Recording/Streaming
Cyan #00FFFF R:OFF G:ON B:ON Available for Chat
White #FFFFFF R:ON G:ON B:ON General Lighting
Off #000000 R:OFF G:OFF B:OFF Sign Disabled

🔌 Hardware Connections

ESP32 Pin → LED Strip Connection
GPIO32 → LED Red (-)
GPIO33 → LED Green (-)
GPIO14 → LED Blue (-)
3.3V → LED Strip (+)

See WIRING_GUIDE.md for complete wiring diagrams and power considerations.

📚 API Reference

GET /?color=#RRGGBB

Set LED color using hex color code.

  • Parameter: color - 6-digit hex color code (with or without #)
  • Response: Plain text confirmation with digital RGB states
  • Example: /?color=#FF0000 sets LEDs to red (digital ON)

GET /status

Returns current LED status in JSON format.

  • Response: {"red":true,"green":false,"blue":false,"ip":"192.168.1.100"}

GET /

Without parameters, shows a simple help page with usage examples.

🛠️ Technical Specifications

  • Microcontroller: ESP32-WROVER-E
  • Control Method: Digital GPIO (ON/OFF only)
  • RGB Channels: 3 (Red: GPIO32, Green: GPIO33, Blue: GPIO14)
  • WiFi Mode: Station (STA) - connects to existing network
  • Protocol: HTTP GET requests
  • Power: 3.3V from ESP32 (low power) or external 5V supply

🔧 Customization

Changing Pin Assignments

Edit these definitions in the Arduino code:

#define RED_PIN 32    // Change GPIO numbers as needed
#define GREEN_PIN 33
#define BLUE_PIN 14

Common Cathode LEDs

If using common cathode LEDs, change the logic in updateLEDs():

// Change from:
digitalWrite(RED_PIN, currentColor.red ? LOW : HIGH);
// To:
digitalWrite(RED_PIN, currentColor.red ? HIGH : LOW);

WiFi Credentials

Update your network credentials in the code:

const char* ssid = "YourNetworkName";
const char* password = "YourPassword";

🐛 Troubleshooting

LEDs not lighting up:

  • Check power connections
  • Verify GPIO pin wiring
  • Ensure LEDs are common anode type
  • Try setting to white first: ?color=#FFFFFF

WiFi connection issues:

  • Check network name and password in code
  • Ensure network is 2.4GHz (ESP32 doesn't support 5GHz)
  • Check serial monitor for connection status

Can't control from HTML interface:

  • Verify ESP32 IP address in serial monitor
  • Enter correct IP in the HTML interface
  • Ensure device and computer are on same network
  • Check for HTTPS mixed content warnings

Colors appear inverted:

  • Code assumes common anode LEDs
  • For common cathode, modify GPIO logic in code

HTTP requests not working:

  • Test with curl or browser first: http://IP_ADDRESS/?color=#FF0000
  • Check firewall settings
  • Verify ESP32 is responding (check serial monitor)

📄 Files

  • rgb_busy_sign/rgb_busy_sign.ino - ESP32 Arduino code
  • index.html - Local web interface for controlling colors
  • WIRING_GUIDE.md - Hardware connection instructions
  • README.md - This documentation

📄 License

This project is open source. Feel free to modify and distribute according to your needs.

🤝 Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

About

RGB LED "Busy Light" Prototype using ESP32

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages