#include <Adafruit_NeoPixel.h>
int potentPin = 0;
int pixelPin = 9;
int pixelLength = 16;
Adafruit_NeoPixel strip(pixelLength, pixelPin, NEO_GRB + NEO_KHZ800);
void setup() {
// put your setup code here, to run once:
strip.begin();
}
void loop() {
// put your main code here, to run repeatedly:
strip.clear();
int potentVal = analogRead(potentPin);
int mapVal = map(potentVal, 0, 1023, 0, 15);
strip.setPixelColor(mapVal, strip.Color(HIGH*255,HIGH*255,HIGH*255));
strip.show();
}