This is a simple prototype project for a LED lamp which uses two-dimensional matrix of individually controlled LEDs WS2812 (Neopixel) as a light source.
Current version is only tested with Arduino Nano V3 (ATMega328).
In the current version all Neopixels are lit at the same colour / brightness.
Rotary encoder is used as the lamp control. Rotating the encoder's shaft causes brightness or hue (whichever is selected) to change. Long-clicking the rotary encoder's button changes control mode between hue and brightness. Short-click switches light on and off.
All settings can be customised by modifying hardware.h.
Neopixel data line: pin 13.
Rotary encoder lines A & B: pins 2 and 3.
Rotary encoder button: pin 4.
By default all three rotary encoder lines have internal pull-up enabled.
By default Neopixel array is set as follows: 8 rows x 4 columns, arranged by columns, total 32 Neopixels.
Arduino Nano (ATMega328) is far too advanced for such a simple project (though efficient for prototyping and debugging). Future versions will be adapted to work with ATTiny as well. Adding support for remote-controlled neopixel lamp based on ESP8266 will be considered in future versions.
Switch to proper HSV colour model.
Add direction parameter: when enabled only one (selectable) column of Neopixels is on, providing directional light.
Add animated effects to take advantage of Neopixels.
Rotary encoder control implementation is based on lookup table approach described here by Oleg Mazurov.
Fast neopixel control is based on this project by Josh Levine.
Copyright (C) 2017 Nick Naumenko (https://github.com/nnaumenko) All rights reserved
This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.