LilyGO / TTGO-T-Beam

336 stars 111 forks source link

Inturrupt triggered without reason #46

Open skapin opened 3 years ago

skapin commented 3 years ago

We use a TBeam v1.1 board, and have trouble with interrupt. Interrupt are triggered without reason.

==> Our setup We have setup a pin(25) as INPUT_PULLUP to a micro switch plugged to GND. Pin 13 is connected to a relay, (and so pin3.3 and pin GND) The relay control a 220v LED (connected to sector)

==> What happend ?

Sometime, the interrupt on pin 25 is triggered automatically, without any reason. We have soldered pin 25 to GND, but this doesnt change anything. Like 3-4 time each second, we have the intterupt called.

    pinMode(DOOR_SWITCH_PIN, INPUT_PULLUP);
    attachInterrupt(digitalPinToInterrupt(DOOR_SWITCH_PIN),
                    DoorOpenning_InterruptHandler,
                    RISING);
static void IRAM_ATTR DoorOpenning_InterruptHandler()
{
    debugPrintln("===> EMERGENCY");

==> What have we tried ?

Does someone have an explanation or tell us what we are doing wrong ?