We created an entry in the 2017 CVAC Art Boot Fundraiser.
It featured laser cut (foam & wood) detailing, and an ESP8266 acting as a WiFi hotspot and LED controller.
The main application controls 6 strands of LEDs.
- The number of active strands
- How fast the PWM amplitude of each strand oscillates
- How quickly the active set of strands rotates around all the strands
I started creating a Python based application that let me develop and test the Websocket based interface.
It also let me quickly develop the logic for controlling the LED strands. It wasn’t pretty- it just prints the LED PWM levels to
stdout. But it did let me quickly identify gross errors and fix them.
IoT ESP8266 Projects
There lots of “control an LED” ESP8266 projects out there. Each has it’s own particular set of goals and approaches.
You can learn a lot by doing some “compare and contrast” research.
- ESP8266 Websockets demo using NeoPixels- a little outdated (re JQuery mobile… need to use the latest dev version as of Jan 2017), but excellent. Was the keystone reference to get started.
- ESP8266 - On Websockets, mdns, OTA and LEDS
Websocket to Serial- source code- solid example of how to set up and use the
Simple Augmented Reality With OpenCV, Three.js And WebSockets- really useful tutorial/article. Reading through this gave me a good starting point for the
threading- tutorial about the
Turns out IoS has some ‘tricks’ to handle captive portals
I got around it by adding “success” to the title of the first page that should be loaded from the ESP8266 when it is running as a captive portal.
- Captive portal issues
- list of domains that older iOS devices check for
- Captive Portal or force all webcalls to ESP8266 AP IP address
Setting up the ESP8266 to serve DNS- e.g. to redirect all DNS requests to the ESP8266.
- ESPAsyncWebServer: awesome, fast, feature-full async server that is easy to integrate with a “main loop” that does the rest of your project logic.
SPIFFS File System
Didn’t implement this, but it looks very easy to do.