A beautiful, smart bedside lamp with mesh networking capabilities, gesture controls, and multiple lighting modes. Built on ESP32-C3 with 3D-printed components and WS2812B LED strips.
- โจ Features
- ๐ญ Available Lighting Modes
- ๐ Quick Setup
- ๐ธ Gallery
- ๐ Mesh Communication
- ๐ง Hardware Components
- ๐ฆ Software Installation (Advanced)
- ๐จโ๐ป Development
- ๐ License
- ๐จ Multiple Lighting Modes: Static colors, rainbow, beacon, candle effect, and more
- ๐ค Mesh Networking: Synchronize multiple lamps wirelessly
- ๐ Gesture Control: Hand proximity sensing with VL53L0X distance sensor
- ๐ Physical Controls: Simple button interface for mode switching
- ๐ 3D Printable: Complete STL files for custom lamp housing
- ๐ง Easy Setup: One-command installation with interactive configuration
- ๐ฑ Device Management: Automatic ESP32 detection and flashing
- ๐พ Backup System: Configuration backup and restore
- ๐จ StaticMode: Single solid color with full brightness control
- ๐ ColorPickerMode: Cycle through color spectrum with distance sensor
- ๐ RainbowMode: Classic flowing rainbow effect with speed control
- โจ RandomGlowMode: 10-color random transitions with zen to party speeds
- NEW v3.3.0: Enhanced with 10 scientifically distributed colors (every 36ยฐ in HSV space)
- Features: Pause/transition cycles, inherited brightness control, mesh synchronization
- Speed modes: Zen (meditative) โ Normal โ Lebendig (energetic) โ Hektisch (party)
- ๐ฏ๏ธ CandleMode: Realistic candle flicker simulation
- ๐จ BeaconMode: Beacon/alert patterns for notifications
- ๐ SunsetMode: Natural sunset simulation for bedtime
- ๐ซ StrobeMode: Synchronized strobe effects across mesh network
- ๐ฎ MiniGame: Interactive games using distance sensor
Note: Development modes are available in the codebase but commented out in
main.cpp
. Uncomment to enable additional lighting effects.
![]() |
![]() |
![]() |
This is an overview of the different modes available in the lamp. The modes can be toggled using the button.
Now you can configure a mesh network between the lamps. The lamps can communicate with each other and synchronize the modes. The communication is done using the PainlessMesh
library.
You can set the mesh SSID and password in the include/GlowConfig.h
file. The default values are GlowMesh
and GlowMesh
. This authentication is necessary to prevent unauthorized access to the mesh network and allows you to split the network into different groups.
- DUBEUYEW ESP32-C3 Development Board Mini
- VL53L0X distance sensor
- Simple push button (height โฅ 6mm)
- WS2812B 5V LED strip (11 LEDs)
- External 5V power supply
- USB-C and some other necessary cables
- 3x M3 threaded insert
- 3x M3 screws
- 3D printer + filament (white and a color of your choice)
- Soldering iron + solder
- 2x Heat shrink tube
- Screwdriver
You can find the 3D models in the
/printing
folder. The models are designed to be 3D printed and assembled. The lamp consists of three parts: the base, the lampshade, and the lampshade holder.
![]() |
![]() |
![]() |
The components are connected to the ESP32C3 using the following diagram:
The Button does not require a resistor, as the ESP32C3 has internal pull-up resistors.
This table also shows the connections:
Component | Pin | ESP32C3 Pin |
---|---|---|
Button | 1 | GND |
2 | GPIO 4 | |
VL53L0X | VCC | 5V |
GND | GND | |
SDA | GPIO 6 | |
SCL | GPIO 7 | |
WS2812B | VCC | 5V |
GND | GND | |
DI | GPIO 3 |
The
VL53L0X
is the distance sensor, theWS2812B
is the LED strip, and theButton
is the push button.
![]() |
![]() |
To attach the lampshade to the base, a threaded insert is used. The insert is placed in the base, and the lampshade is screwed onto it.
![]() |
![]() |
![]() |
Get started in just one command! The GlowLight setup system will guide you through the entire installation process:
curl -fsSL https://raw.githubusercontent.com/friedjof/GlowLight/master/install.sh > install.sh && bash install.sh
Alternative download method:
wget https://raw.githubusercontent.com/friedjof/GlowLight/master/install.sh && bash install.sh
- ๐ Checks system requirements (Python 3.8+, Git)
- ๐ฆ Installs dependencies automatically for your OS (Ubuntu/Debian, Fedora, Arch, macOS)
- ๐ Downloads the GlowLight project to
~/GlowLight
- ๐ ๏ธ Launches the interactive setup system with a beautiful menu interface
- โ๏ธ Project Configuration: Set up mesh network and GPIO pins with guided wizards
- ๐จ Build & Flash: Compile and upload firmware to your ESP32-C3 with one click
- ๐ฑ Device Management: Automatic ESP32 device detection and management
- ๐บ Serial Monitor: Real-time device monitoring with logging
- ๐ง PlatformIO Setup: Automatic PlatformIO installation and management
- ๐พ Backup System: Configuration backup and restore functionality
If you prefer to set up manually:
# Clone the repository
git clone https://github.com/friedjof/GlowLight.git
cd GlowLight
# Run the setup system
python3 scripts/setup.py
This is a PlatformIO project. The setup system above handles everything automatically, but for manual installation, PlatformIO must be installed. Once installed, you can open the project in PlatformIO and flash the software onto the ESP32C3.
Alternatively, a Makefile
is included, allowing you to flash the software via the command line. For this, PlatformIO must be installed, and the PLATFORMIO
environment variable should point to the PlatformIO executable.
If you're familiar with Nix-shell, you can use the shell.nix
file to set up the environment for PlatformIO.
pio run
: Compiles the softwarepio run --target upload
: Flashes the software to the ESP32C3pio run --target clean
: Removes compiled filespio device monitor
: Opens a terminal to view the ESP32C3 output
make
: Compiles the softwaremake upload
: Flashes the software to the ESP32C3make clean
: Removes compiled filesmake monitor
: Opens a terminal to view the ESP32C3 outputmake flash
: Flashes the software and opens the monitormake start
: Cleans, compiles, flashes the software, and opens the monitor
ArrayList
for dynamic arraysButton2
for button input handlingAdafruit_VL53L0X
for the distance sensorFastLED
for LED control
For more details on the libraries, refer to the platformio.ini
file.
The software is written in C++ and is structured as a typical PlatformIO project. The main file is src/main.cpp
, which contains the setup and loop functions. The different modes, services, and the controller are implemented in separate files in the /lib
folder.
Every mode is a class that inherits from the AbstractMode
class. The abstract class already implements the basic functions that every mode should have. In every mode, the following functions must be implemented: setup
, customFirst
, customLoop
, last
, and customClick
.
setup
: This function is called once when the mode is added to the controller when the lamp is turned on.customFirst
: This function is called once when the mode is newly selected.customLoop
: This function is called every loop iteration.last
: This function is called once when the mode is removed from the controller.customClick
: This function is called when a double click is detected from the button.
This project is licensed under the GNU General Public License v3.0. For more information, see the LICENSE
file.
This is a beta version of the project. The software is still under development, and the hardware may require some adjustments. I cannot guarantee that the project will work as expected and will not be responsible for any damage caused by the project.
New to GlowLight? Get started with just one command:
curl -fsSL https://raw.githubusercontent.com/friedjof/GlowLight/master/install.sh | bash
The setup system will guide you through everything! ๐