Author Topic: False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3  (Read 1169 times)

0 Members and 1 Guest are viewing this topic.

Offline CDN_TorstenTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
  • Professional electron whisperer
False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3
« on: January 22, 2023, 02:04:47 pm »
I think I may have found a bug in the latest Arduino IDE(2.0.3) when using A3 as a digital input on the Nano.

I'm reading switches with an external pull-up to 5V.
A0, A1, A2, A4, and A5 work correctly with:
digitalRead(A#)

For some reason A3 does not work with digitalRead(A3) - it outputs a 0 constantly.
Using A3 with analogRead(A3) works as expected.

Has anyone else seen this??
« Last Edit: January 23, 2023, 02:02:08 am by CDN_Torsten »
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #1 on: January 22, 2023, 05:00:41 pm »
Does using   digitalRead(17)   work on pin A3 ?
 

Offline ozcar

  • Frequent Contributor
  • **
  • Posts: 322
  • Country: au
Re: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #2 on: January 22, 2023, 08:06:10 pm »
I have been carefully avoiding going anywhere near the new IDE, but thinking that now was as good a time as any to try it, I installed 2.0.3 and grabbed the first Nano that I could find here.

Seems to work fine for me if I do things like:

Code: [Select]
  Serial.println(digitalRead(A3));                          // and/or ...
  digitalWrite(LED_BUILTIN,digitalRead(A3));
 

Offline CDN_TorstenTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
  • Professional electron whisperer
Re: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #3 on: January 23, 2023, 01:00:00 am »
Does using   digitalRead(17)   work on pin A3 ?

I tested this and it too does not function correctly. :(
 

Offline CDN_TorstenTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
  • Professional electron whisperer
Re: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #4 on: January 23, 2023, 01:06:34 am »
I have been carefully avoiding going anywhere near the new IDE, but thinking that now was as good a time as any to try it, I installed 2.0.3 and grabbed the first Nano that I could find here.

Seems to work fine for me if I do things like:

Code: [Select]
  Serial.println(digitalRead(A3));                          // and/or ...
  digitalWrite(LED_BUILTIN,digitalRead(A3));

I was somewhat reckless and updated my system. |O
When you ran the code did you actually have a level applied to the pin which read back correctly, or did you just test if the compiler accepted it?

My plan is to start with a new Sketch tomorrow which will only contain code to read A3 - I need to isolate the problem to ensure it's not something conflicting in the code.


 

Offline CDN_TorstenTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
  • Professional electron whisperer
Re: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #5 on: January 23, 2023, 02:00:41 am »
Looks like a false alarm.

... just created a new Sketch to only read A3.  Seems like it is behaving correctly.

I now need to see who's library is causing conflict in the main code.
Grrr...really hate wallowing through other people's code  :-\

Should there be any interesting learnings I'll post it here.

Thanks everyone!
 

Offline CDN_TorstenTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
  • Professional electron whisperer
Re: False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #6 on: January 23, 2023, 04:02:46 am »
The 'offending' code was located in the ST7920 driver - CS was being set as an output on A3 and driven low.  I've removed this and everything is now working as needed.
Sorry for the false alarm.
:(
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Re: False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #7 on: January 23, 2023, 09:50:11 am »
Did take a quick look at Arduino 2 but soon removed it as not that much different from the original and a bit suspicious of any bugs like yours.

Plenty of far better IDEs  out there to choose from  , we use the Free Atmel Studio 7 ( now Microchip Studio) along with the Visual Micro plug in which enables you to work on new and existing  Arduino IDE sketches etc.   makes handling large code so much easier.

https://www.learnrobotics.org/blog/arduino-ide-alternatives/
 

Offline CDN_TorstenTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
  • Professional electron whisperer
Re: False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #8 on: January 23, 2023, 12:56:28 pm »
Thanks for the suggestion(s).
I was not aware that Atmel/Microchip Studio 7 could be used for Arduino Sketches. 
I've only used it to develop customer/critical code in C and ASM...will look into this.
 

Offline bidrohini

  • Regular Contributor
  • *
  • Posts: 201
  • Country: bd
Re: False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #9 on: January 24, 2023, 12:14:44 pm »
Thanks for the post and the entire thread. Will avoid this version.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Re: False Alarm: Bug?: Arduino IDE 2.0.3 using Nano A3
« Reply #10 on: January 25, 2023, 12:55:30 am »
Did take a quick look at Arduino 2 but soon removed it as not that much different from the original and a bit suspicious of any bugs like yours.

Plenty of far better IDEs  out there to choose from  , we use the Free Atmel Studio 7 ( now Microchip Studio) along with the Visual Micro plug in which enables you to work on new and existing  Arduino IDE sketches etc.   makes handling large code so much easier.

https://www.learnrobotics.org/blog/arduino-ide-alternatives/

It wasn't a bug..
and I would use Visual Studio with either Visual Micro, or VisualGDB. I wouldn't bother with the microchip edition, unless you needed it for other reasons. Might be harmless though.

Thanks for the post and the entire thread. Will avoid this version.

You didn't read the thread though..
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: newbrain


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf