I am trying to follow a simple tutorial: https://www.pjrc.com/teensy/tutorial3.html
Here's the code I'm trying to run:
void setup() {
Serial.begin(38400);
pinMode(7, INPUT);
}
void loop()
{
if (digitalRead(7) == HIGH) {
Serial.println("Button is not pressed...");
} else {
Serial.println("Button pressed!!!");
}
delay(250);
}
My serial monitor spams "Button pressed!!!"
and my buttons do nothing... what am I missing?
Here's the code I'm trying to run:
void setup() {
Serial.begin(38400);
pinMode(7, INPUT);
}
void loop()
{
if (digitalRead(7) == HIGH) {
Serial.println("Button is not pressed...");
} else {
Serial.println("Button pressed!!!");
}
delay(250);
}
My serial monitor spams "Button pressed!!!"
and my buttons do nothing... what am I missing?