Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Nano Every Analog Pins Issues #9024

Closed
seisfeld opened this issue Jun 28, 2019 · 3 comments
Closed

Arduino Nano Every Analog Pins Issues #9024

seisfeld opened this issue Jun 28, 2019 · 3 comments
Labels
Component: Core Related to the code for the standard Arduino API Waiting for feedback More information must be provided before we can proceed

Comments

@seisfeld
Copy link

seisfeld commented Jun 28, 2019

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

@facchinm
Copy link
Member

Hi @seisfeld ,
the bug was discovered just after releasing 1.8.1 and already fixed in master (arduino/ArduinoCore-megaavr@4e03d35) .

I'm going to publish 1.8.2 early next week; in the meantime, if you want to test the fix, I'm attaching a core you can use to replace the existing one
megaavr-1.8.2-beta.zip

@facchinm facchinm added Component: Core Related to the code for the standard Arduino API Waiting for feedback More information must be provided before we can proceed labels Jun 28, 2019
@seisfeld
Copy link
Author

Hey @facchinm,

thanks for your prompt reply. I unzipped the 1.8.2-beta, copied it in place and retried both examples above. Both now work as expected! Awesome!

Thanks again for your assistance. I'm looking forward to the next release. :)

cheers
Stephan

@facchinm
Copy link
Member

facchinm commented Jul 1, 2019

I just published official 1.8.2, closing the issue as fixed 😉

@facchinm facchinm closed this as completed Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Related to the code for the standard Arduino API Waiting for feedback More information must be provided before we can proceed
Projects
None yet
Development

No branches or pull requests

2 participants