(I'm not very much good at coding)
When I'm using this Dimmer Code then its working fine even for a long time and nothing is getting burnt nor heated up.
when the code enters into if() loop only at that time my resistor burnt 2 times.
so it is due to zero cross detection isn't happening due to...