#include <Adafruit_NeoPixel.h>
#define pot_red 34
#define pot_blue 35
#define pot_green 32
#define PIN 22
#define NUMPIXELS 16
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
pixels.begin();
// put your setup code here, to run once:
}
void loop() {
int green = analogRead(pot_green)*0.06;
int red = analogRead(pot_red)*0.06;
int blue = analogRead(pot_blue)*0.06;
for(int i = 0; i < NUMPIXELS; i++){
pixels.setPixelColor(i, pixels.Color(red,green,blue));
}
pixels.show();
// put your main code here, to run repeatedly:
delay(50); // this speeds up the simulation
}