This is a fun and quick demo on how to use one Mikroe 4×4 RGB click and one Motion click to create some motion-activated lights. Besides these two click boards the project requires one Arduino Uno Click Shield and one Seeeduino Mega.
As in other projects that use 3.3V only clicks, the Seeeduino Mega is mandatory, as it’s one of the few Arduino boards that can be configured for 3.3V operation with the flip of a switch.
The hardware doesn’t need many explanations. Just configure the Seeeduino Mega for 3.3V operation, place the Motion click is slot #1 of the Arduino Click Shield and place the (3.3V configured) 4×4 RGB click in slot #2 of the Arduino Click Shield. That’s it.
The code relies on the Adafruit NeoPixel library to turn on the blue LEDs when motion is detected, then after a short delay it slowly fades the light off. Of course, many light effects can be implemented, the only limit is your imagination.
For a 9V power supply the project takes 39mA when all LEDs are off, and 90mA when the blue LEDs are on. It’s worth mentioning here that the Seeeduino Mega itself needs 28mA. So, if you plan to run this project on a battery (think Halloween pranks) don’t expect that battery to last for long.
Originally published at https://electronza.com on October 6, 2015. Moved to Medium on May 5. 2020.