Hi Damien
The code starts right away. It uses the DIM_UP and DIM_DOWN buttons to change the dimming value.
the NOP commands are repeated as a means of attaining a small delay time between the GPIO.0 on and GPIO.0 off commands. Meaning, make a tiny pulse to fire the triac.
A tiny warning, the PBPro compiler doesn't support the CONTEXT RESTORE command. You should also read up on Darrel Taylor's instant interrupts to get this working smoothly under PBPro. The interrupts supported by PBPro are too primitive to achieve anything time critical.
Alain, I think the circuit should be good for a ceiling fan too. The triac rating should help to decide that.
Bookmarks