#include <Adafruit_NeoPixel.h>
#define PIN 6
#define PIN A0
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
// put your setup code here, to run once:
pinMode(A0, INPUT);
strip.begin();
strip.show();
}
void loop() {
// put your main code here, to run repeatedly:
strip.clear();
int potenVal = analogRead(A0);
uint16_t lightVal = map(potenVal, 0, 1023, 0, 15);
uint16_t test = 2;
strip.setPixelColor(test, strip.Color(255, 0, 0));
strip.show();
for(int i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, strip.Color(0, 150, 0));
strip.show();
delay(10);
}
delay(10);
}