WiFi RGB Lamp Web Server

Dependencies:   mbed ESP8266_WebServer

RGB WiFi Lamp

Firmware

This is the official firmware repository for the BinarySpace RGB WiFi Lamp project. This firmware is still in alpha stage, and subject to change.

Planned changes include:

  • Configure the WiFi Lamp to connect onto your SSID
  • Variety of operating modes like
    • Fixed colour operation
    • Rainbow gradient
    • Time-based colour changing
    • API-based colour changing

Connecting to the WiFi lamp

To connect to the WiFi lamp web server, scan for an open WiFi network using your cellphone, tablet or laptop that begins with the letters ESP_xxxxxx. This is the automatically created SSID of the ESP8266 WiFi module used in the lamp. Your WiFi client needs to be configured to use DHCP.

Once connected, simply point your browser at http://192.168.4.1 and you should see the rudementary web interface allowing you to switch the WiFi lamp on in the red colour or off.

A second option is to enter the following URL
http://192.168.4.1/setcolor?r=x&g=x&b=x
where x is a number between 0 and 255 for the intensity of (r)ed, (g)reen and (b)lue respectively. Any of the r,g,b parts not specified will automatically default to 0

Supported Platforms

  • ST Nucleo F103RB
  • ST Nucleo F302R8
  • ST Nucleo L152RE
  • ST Nucleo F401RE

Unsupported Platforms

  • ST Nucleo F030R8 (unsupported due to insufficient registers for PololuLed library)

How to update your firmware

One of the best things about the ST Nucleo series is that they enumerate as a USB Mass Storage device when plugged in. Updating the firmware is as simple as compiling it using mbed compiler(free registration required to use) for your selected platform, plugging in your Nucleo and copying the .bin file created by the compiler to the USB drive enumerated by the Nucleo. That's it!

Code is fully Open Source

Please feel free to fork this repository and to submit pull requests if you make any cool additions/changes.

If you are developing changes to the firmware and monitoring via serial console for debugging purposes, note than you can simply comment out the #define DEBUG_WIFI line at the top of the main.cpp file to make the output much less verbose. This effectively disables debugging of the WebServer library code and echoing of communications between the Nucleo and the ESP. It also makes the web server noticeably faster, as it doesn't have to output a lot of serial data before handling requests.

LED Strip colour inconsistency

If you are experiencing problems with the LED's not all changing colour, or perhaps flickering or incorrect colour, there could be 2 potential problems we have identified.

  • Power Supply problems - If the power supply is not providing enough power, or not clean enough power, you may experience flickering or random colour changes. Ensure that your power supply can provide enough power (1A @ 5V recommended). If this does not solve your problem, soldering a capacitor over the power supply lines(5V, GND) may help to clean out any noise from the power supply. (100uF minimum)
  • Depending on cable lengths and connectors, noise on the data line may also be a problem. Try soldering a 100Ω - 500Ω resistor in line on the Din pin of the LED strip

Firmware update for the ESP8266 Module

We suggest you upgrade the firmware on the ESP8266 module to the latest official AT firmware from Espressif. Click Here for a detailed upgrade quide.

Revisions of main.cpp

Revision Date Message Actions
28:ba5c68a04f56 2015-01-08 Disco Mode File  Diff  Annotate
27:88093aa94e24 2015-01-08 Fixed robots.txt spelling mistake File  Diff  Annotate
26:ea5e0ff46492 2015-01-07 Add favicon, robots.txt and LED Disco Function, no WebGUI yet. File  Diff  Annotate
25:841fc9daffa5 2015-01-06 Removed unnecessary code that was commented out File  Diff  Annotate
24:849265425708 2015-01-05 Fixed bug with ESP module startup sequence File  Diff  Annotate
23:3563e1699fb9 2015-01-04 Added config screen functionality; Updated Color Picker to be more bandwidth and RAM friendly; Merged in latest WebServer File  Diff  Annotate
22:6d7a72fab8ff 2015-01-01 Added Color Picker function to home screen File  Diff  Annotate
20:f5a6527bfda6 2014-12-31 Rework of Web Server to handle multiple simultaneous requests File  Diff  Annotate
19:7fdccfd5b50b 2014-12-29 Merge leet's front page changes into new firmware branch File  Diff  Annotate
16:f2f2da9ef9ab 2014-12-28 Add alias for setcolour/setcolor; Add to frontpage, basic set colour form; File  Diff  Annotate
13:1e8f27da036a 2014-12-29 Updated revision after ESP8266 Firmware upgrade File  Diff  Annotate
12:fbf950985e1c 2014-12-28 Updated Lee's primary colour additions to new WebServer API File  Diff  Annotate
11:3ab606a42227 2014-12-28 WebServer API Updates for multiple content types File  Diff  Annotate
10:f48a9f923271 2014-12-28 Add green, blue and white links, with minor wording updates. File  Diff  Annotate
9:319aeb6e0123 2014-12-27 Updated ESP8266 Web Server to handle multiple requests better, and to automatically analyze and populate GET parameters File  Diff  Annotate
8:f819de1946a7 2014-12-19 8 LED firmware with support for F302 Nucleo added File  Diff  Annotate
7:f15c81074400 2014-12-18 Moved all current WebServer functionality to ESP8266_WebServer class File  Diff  Annotate
4:4a502f72cbe3 2014-12-01 added setcolor url File  Diff  Annotate
1:f07afcffeb5a 2014-11-20 Extracting URI and Pololu LED Intergation File  Diff  Annotate
0:d21e3e1c0a4b 2014-11-16 Initial Commit File  Diff  Annotate