Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Nano Input pins with pullups not going low when directly connected to ground
Post Flair (click to view more posts with a particular flair)
Post Body

OK so I built up a circuit on a perfboard. It has a button. I noticed that my Serial output was not showing the change/button press/pull to GND.

The perfboard has female headers for an Arduino Nano. Fearing a wiring or soldering mistake or oversight, I removed the Nano(clone, old bootloader) from my perfboard headers, and wrote this basic test:

//Button tester
#define buttonpin 12
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  pinMode(buttonpin, INPUT_PULLUP);
  Serial.println("*****************************");

}

void loop() {
  // put your main code here, to run repeatedly:
  int buttonstate=digitalRead(buttonpin);
  delay(250);
  if(buttonstate=1){
    Serial.println(buttonstate);
  }
  else if(buttonstate=0){
    Serial.println("OTHER");
  }
}

I tested pins 4,5,6 and 12 by connecting a dupont female-to-female header to the pin in the code, and both GND pins, each in-turn. The Serial output continuously indicated that the pin was HIGH.

So now I'm thinking, I've fried my Nano clone.

So I go grab another one that I hadn't unwrapped yet.

Same story...any digital pin, either ground, either with our without the internal pullups, no change in state.

How do I test properly out-of-circuit? Is there something I'm missing?

I've continuity checked my perfboard as well, but I can't even plug the Nano back in until I can do a successful button press?

I'm honestly confused. I'd get it if I'd fried Nano1 and Nano2 worked, but there is obviously some piece of knowledge that I lack.

Please note that at no time was Nano2 ever plugged into my perfboard. I opened the static bag and plugged it right into usb, uploaded the test, yada yada yada.

Just for giggles, I used HIGH and LOW in the "IF" statements. I also tested the input pins as output with a simple on/delay/off/delay and they worked just fine.

Thoughts?

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
17,628
Link Karma
1,023
Comment Karma
16,545
Profile updated: 2 days ago
Posts updated: 8 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago