Lamp_Simple1Button

Animated Rainbow LED Lamp w/ WS2812b LED stripes, Arduino and 1 Button.

MIT License

Stars
18

Lamp_Simple1Button

Animated Rainbow LED Lamp w/ WS2812b LED stripes, Arduino and 1 Button.

Parts

  • 1x Board: WeMos D1 mini with ESP8266 processor
  • LED strip with 16 WS2812b LEDs
  • 1x mechanical push button (long button pin: bottom-to-top=1.5cm)
  • 1x 10kOhm resistor as pull-up for the button
  • Powered via MicroUSB (5V, 1A)
  • 1x cardboard case (half-circle, radius=8.5cm, inner thickness=1.5cm)
  • 1x laminated paper as front screen (80g, half-circle, as big as your laminating pouch allows)

Software

  • Arduino IDE
  • ESP8266 toolchain
    • Add in File -> Preferences -> Additional board manager URLs: http://arduino.esp8266.com/stable/package_esp8266com_index.json
    • Search in Tools -> Board -> Board Manager for "esp8266", then install version 2.4.1 (if you want the newest version, you need to heed the FastLED notes below)
      • Select "WeMos D1 R2 & mini" or "LOLIN(WeMos) D1 R2 & mini" in Tools -> Board menu
  • Libraries

Troubleshooting

  • Compile error: "D6/D3 was not declared in this scope": Select the right board (see above)
  • Compile error: "conflicting declaration 'typedef uint8_t boolean'": Patch FastLED or use ESP8622 board definitions version 2.4.1

Building more features

Potentially helpful libraries include:

  • ESP8266WiFi (basic WiFi library for ESP8266, compatible with standard Arduino WiFi lib; included with board toolchain)
  • WiFiManager (provides a captive portal to set up WiFi secrets; see Library Manager)
  • ESPUI (provides a simple Web UI; see Library Manager)

Implementation details

Case cutout as SVG, suitable for laser cutting Circuit Case measures Case cutout_plan Case overview 2 Case overview Board side Board side Data Pins 2 Data Pins Button R1 Button plus R1 Case back Case closed Case lock Rainbow_lamp case holder