//-------------------------------------------------------------------
#define PIN_RGB_ROT 9
#define PIN_LED_RGB_GRUEN 6
#define PIN_LED_RGB_BLAU 10
#define PIN_ADC_POTENTIOMETER A0
//-------------------------------------------------------------------
void setup() {
// nix
}
//-------------------------------------------------------------------
void loop() {
//---
// ADC-Wert vom Potentiometer einlesen: 0...1023
int adc_potentiometer = analogRead(PIN_ADC_POTENTIOMETER);
//---
// Tastgrad berechnen: 0...1023 --> 0...255
int tg_blau = map(adc_potentiometer, 0, 1023, 0, 255);
//---
// BLAU: Tastgrad 0...255
analogWrite(PIN_LED_RGB_BLAU, tg_blau);
//---
// Pause 100ms (10Hz)
delay(100);
}