mlderanian
New member
We have wired a teensy 4.0 to a single button and are trying to identify when the button is pressed, but once the button is pressed we only get that the teensy resets.
Code:
Wiring:
singal Pin -> to 10 k resitor to -> ground and the other side of the button
3.3 v to one side of the button
Any ideas why this could be hapenning.
Code:
HTML:
void setup() {
pinMode(4,INPUT_PULLUP);
}
void loop() {
if( digitalRead(4) == HIGH){
Serial.println("Button Pressed");
delay(1000);
}
}
Wiring:
singal Pin -> to 10 k resitor to -> ground and the other side of the button
3.3 v to one side of the button
Any ideas why this could be hapenning.