Status – 5 Nov 2017

Ok, some progress on a secondary project with the ESP8266 built into a dollar store nightlight / USB wall socket thing:

  • Arduino environment – works. This worked last year for the interactive TV backlight / notification project, so no surprise. Upgraded to 1.8.5; seems ok; nice serial monitor behaviours.
  • NeoPixels – works via NeoPixelBus on the ESP-01 (I think I used the Adafruit library on the ESP-12). Configuration:
    • Use NeoWs2813Method
    • Use 3.3v instead of 5v for powering 5mm WS2812(?)’s. Level shifter no help (wrong type?
    • Very stable – no glitching, wrong colors, blinkies, etc
  • SPIFFS – works. I use it to hold web pages/objects to serve via wifi; use CheckFlashConfig to validate the IDE has the right flash mem size settings. Must close serial window to upload(?)
  • ESP8266WebServer library – works. Can serve content stored in SPIFFS (it’s not SPIFFS aware, but that’s trivial).
  • Suspect that there is a ~1 second setup() bug(?) so get thru wifi join ASAP in setup.
  • HTTP POST variables – can exchange named key/value pairs with a web client via POST.

Next up:

  • Check the output of the night-light LED via the voltage divider; should be ok to trigger GPIO0.
  • Add code to check (udp?) a service to fetch time & status as provided by a hub of some kind:
    • 16 byte payload (also fits in payload of nRF devices)
      • 6 bytes; date (3) + time (3)
      • 8 bytes; status values of 7 classes + 1 aggregate status – intended to feed an 8 neopixel stick
      • 2 bytes; flags? reserved?
    • Loose protocol; use udp to send request; always listen for reply; no tcp timeouts
  • Use fetched time:
    • Dim display if dark or p.m.
    • Provide ambient light in the a.m.
    • Timestamp for logging, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.