项目作者: maximtrp
项目描述 :
Mood Lamp Based on Arduino and WS2812 RGB LEDs :bulb:
高级语言: C++
项目地址: git://github.com/maximtrp/rgb-led-lamp.git
RGB LED Lamp


This is a simple mood lamp which gradually changes its color according to HSV color model.
Build setup
- Arduino Nano.
- WS2812 LED strip.
- Power supply (5V). Each RGB LED draws approximately 50 mA. If you have 20 LEDs, then you will need a 5V power supply capable of delivering at least 1A (and more is better).
- Lamp. I took a cheap one, pulled out a socket, and replaced it with an Arduino wired to both LED strips and power supply (see photo above).
Example wiring

Arduino sketch
I had two LED strips wired in parallel, so I addressed both of them in led-lamp-sketch.ino
file. You may change it for your needs. FastLED library is required for compilation.