Hi, I'm using an interrupt function with a button and I was wondering why my interrupt function is triggered when the Teensy is powered up and I don't even press the button ? I see in my serial monitor "Detect" even if I didn't press it. After the setup, the interrupt function works very well, so I was wondering what could I do to solve this problem ?
Thank you !
Code:
void setup()
{
pinMode(39, INPUT_PULLDOWN);
attachInterrupt(digitalPinToInterrupt(39), stop_fct, RISING);
}
void stop_fct()
{
Serial.println("Detect");
}
void loop()
{
}
Thank you !