Go Down

Topic: Uno Reset button gives value of HIGH when not pushed and LOW when pushed (Read 515 times) previous topic - next topic


When the reset button on my Uno is not pushed, there is 5 volts across each side. When the button is pushed, there is 0 volts across the side with the three pins, measuring between the outside pins.

I'm a beginner, but this seems wrong. If so, how can I correct it, or is it a defect in the Uno board.


Dave Parsons


That is  correct operation.
Reset pin needs to be  High for normal operations.

Time to get used to Negative logic:
High = button not pushed.
Low = button pushed.

Code: [Select]

byte pin2 = 2; // pinD2, connect button/switch from D2 to Gnd
byte ledPin = 13; // onboard LED

void setup(){
pinMode (pin2, INPUT);  // read pin D2
digitalWrite (pin2, HIGH); // enables internal pullup resistor

pinMode(ledPin, OUTPUT);  //drive on-board LED
digitalWrite(ledPin, LOW);
} // end setup

void loop(){
if (digitalRead(pin2) == LOW){  // button from pin2 to Gnd pressed?
  digitalWrite(ledPin, HIGH); // turn on on-board LED
else{  // turn it off
digitalWrite(ledPin, LOW);
} // end loop

Make sense? High is the "off" state, and Low is the "on" state
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131