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
- Sketch -> Include Library -> Manage Libraries -> Search for "Button" and "FastLED", install them.
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