#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()
{
//---
int adc_potentiometer = analogRead(PIN_ADC_POTENTIOMETER);
int tg = map(adc_potentiometer, 0, 1023, 0, 255);
//---
for(int x=0; x <=ANZAHL_LED; x++) {
pixels.setPixelColor(x, tg, tg, tg);
}
pixels.show();
delay(100);
}