-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Closed
@seisfeld
Description
Hi,
I'm using IDE 1.8.9. on macOS and megaAVR 1.8.1 is installed.
It appears there is an issue with the new megaAVR based Arduino Nano Every and its analog pins. This code does not blink an LED connected to pin A0, instead the LED stays off. In contrast it works fine when when using LED_BUILTIN. This has been verified on multiple brand new boards.
void setup() { pinMode(A0, OUTPUT); } void loop() { digitalWrite(A0, HIGH); delay(1000); digitalWrite(A0, LOW); delay(1000); }
Similar, input on the analog pins also does not seem to work. The following code does not indicate 0 when A0 is pulled to GND. Instead it always shows 1 (in contrast digital pin 10 works fine):
uint8_t testPin(A0); void setup() { Serial.begin(115200); Serial.println("Start"); pinMode(testPin, INPUT_PULLUP); } void loop() { Serial.print(millis()); Serial.print(' '); Serial.println(digitalRead(testPin)); delay(1000); }
Is this a general issue or am I overseeing something very obvious?
Thanks
Stephan