Almost right !
I only perform the zero crossing détection on the falling edge.
This allows to totally avoid flicker.
So the code is :
- interrupt on falling edge
- wait required delay
- send pulse to MOC
- wait half a period (minus pulse duration)
- send pulse to MOC
And thank you for my youtube channel
and for the link --> really interesting
JP