ArduinoA
Arduino4y ago
PRIME

this is a very basic example you can reconstruct for your self have a look. ```arduino bool latch =

this is a very basic example you can reconstruct for your self have a look.
bool latch = false;
void loop(){
  if (digitalRead(pin) && latch == true){
    latch = false;
    // this would be riseing edge
  }
  else if (!digitalRead(pin) && latch == false){
    latch = true;
    // this would be afalling edge.
  }
}
Was this page helpful?