Week02 - LED Candle

I call this candle painting because I made a candle in a painting frame and it casts reflection on a white canvas/paper.

I made the frame with wood pieces, applied a normal paper to the surface, and placed the round NeoPixel on the bottom of the frame horizontally.

Arduino Code:

#include <Adafruit_NeoPixel.h>

const int neoPixelPin = 5;  // control pin
const int numPixels = 7;    // number of pixels

// set up strip:
Adafruit_NeoPixel strip = Adafruit_NeoPixel(numPixels, neoPixelPin, NEO_GRBW + NEO_KHZ800);

void setup() {
  strip.begin();        // initialize pixel strip
  strip.clear();        // turn all LEDs off
  strip.show();         // update strip

void loop() {
  for (int pixel = 0; pixel<numPixels; pixel++){
    if( pixel == 0)strip.setPixelColor(0,random(200,255),0,0,random(0,20));
    else {
      if( pixel == 1)strip.setPixelColor(1,0,0,random(50,150),random(0,20));
      else strip.setPixelColor(pixel, 255,80,0,random(0,255));
  strip.show();   // update the strip