Created
June 27, 2018 11:41
-
-
Save carlos4242/78f5ac5ab65958ec108328e82f2c9567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the core of the program, a delayed triac fire a set time after zero cross | |
setupPin2InterruptCallback(edgeType: RISING_EDGE) { | |
setupTimerSingleShotInterruptCallback(microseconds: delayUs) { | |
digitalWrite(pin: triacPin, value: HIGH) | |
delay(microseconds: 200) | |
digitalWrite(pin: triacPin, value: LOW) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment