#define sensor_ldr A0
uint16_t ldr_value = 0; //LDR Variable mit Wert 0
void setup()
{
pinMode(LED_BUILTIN, OUTPUT); //interne LED ist output
analogReadResolution(12); //Auflösung des AD - Wandlers einstellen
Serial.begin(115200);
}
void loop()
{
ldr_value = analogRead(sensor_ldr);
Serial.print("Wandlungswert: ");
Serial.println(ldr_value);
delay(100); // this speeds up the simulation
}