diff --git a/wordclock/wordclock.ino b/wordclock/wordclock.ino index 9572b45..b8d36a5 100644 --- a/wordclock/wordclock.ino +++ b/wordclock/wordclock.ino @@ -194,6 +194,9 @@ void setup() pinMode(LED4PIN, OUTPUT); analogReference(DEFAULT); + // known 'bug' in AVR ADC: after switching analog reference, first sample + // could be corrupt and should be ignored --> discard this sample now + analogRead(LIGHTSENSOR_INPUTPIN); current_brightnes=MAXBRIGHTNESS;