I am using mega with interrupt pins 2, 3 and 19.. The problem is when pin voltage (5V) change from 0 to 5V it triggered but when 5V to 0 sometimes it does not triggerred
I have tried debouncing as 5 to 1000microseconds but only 500microseconds is more stabil but it still cant catch the change sometimes... changing periods are not very short more than 3 seconds
I am using a latching button to change pin voltage
Serial.println("Initializing..........");
pinMode(arizaPin1,INPUT);
pinMode(arizaPin2,INPUT);
pinMode(arizaPin3,INPUT);
attachInterrupt(digitalPinToInterrupt(arizaPin1),
arizaflag1,
CHANGE);
attachInterrupt(digitalPinToInterrupt(arizaPin2),
arizaflag2,
CHANGE);
attachInterrupt(digitalPinToInterrupt(arizaPin3),
arizaflag3,
CHANGE);
delay(2000);
8 posts - 5 participants