Arduino: attachInterrupt() mit sowohl RISING als auch FALLING Flanke
English
Deutsch
Du kannst attachInterrupt() mit CHANGE verwenden, um sowohl auf RISING- als auch auf FALLING-Flanken zu triggern.
attachinterrupt_change_arduino.cpp
#define INTERRUPT_PIN 13 // Wähle hier einen Pin mit Interrupt-Funktionalität.
void myInterrupt() {
// TODO Dein Code kommt hier rein.
}
void setup() {
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), myInterrupt, CHANGE);
}If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow