I would like to know "How to control triac through Arduino / nodemcu". The basic operation of on/off is done with the help of MOC 3051 (optocoupler) and triac 16A, 600V. Switching action was successful. Now i would like to control the speed of fan through Arduino / nodemcu.
What kind of fan is it?
If its an induction motor type fan which are the most common, you cant control the speed with a triac, you need a VFD (variable frequency drive.)