0

Bug involving Arduino/INPUT_PULLUP

Hi there,

with an empty Arduino and the following simple code:

void setup()
{
pinMode(3, INPUT_PULLUP);
Serial.begin(9600);
}

void loop()
{
Serial.print(digitalRead(3));
delay(10);
}

I would expect an output of "1" (corresponding to a HIGH from the pull-up resistor). Instead I get a "0".

https://www.tinkercad.com/things/kWpu3E0kPTS-pull-up-bug

Any ideas?

Regards,

Peter

1 comment

Please sign in to leave a comment.