#include <Adafruit_NeoPixel.h>
//---------------------------------------------------------------------
#define PIN_ADC_POTENTIOMETER A0
#define PIN_AUSGABE 9
#define ANZAHL_LED 30
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(ANZAHL_LED, PIN_AUSGABE, NEO_GRB + NEO_KHZ800);
//---------------------------------------------------------------------
void setup()
{
pixels.begin();
}
//---------------------------------------------------------------------
void loop()
{
//****************************************
for(int x=0; x <=ANZAHL_LED; x++) {
pixels.setPixelColor(x, 255, 0, 255);
}
pixels.show();
delay( analogRead(PIN_ADC_POTENTIOMETER) );
//****************************************
for(int x=0; x <=ANZAHL_LED; x++) {
pixels.setPixelColor(x, 0, 0, 0);
}
pixels.show();
delay( analogRead(PIN_ADC_POTENTIOMETER) );
}