I am building an automatic system for hydroponic.
My sketch works very well instead for one thing, the AC DIMMER.
When I upload the AC dimmer code alone, it works perfectly fine but when I upload it with the rest of the code, the AC DIMMER seems to work but the LED goes much more slower.
I don't know if it could be that because of the integration of Blink, that the system goes to slow and the AC DIMMER that need to work fast, probably doesn't work.
Please Help me.
PD: SKETCHFINALHIDROPONIA is the complete one and the other one (ACDIMMERFINAL) is the sketch for the AC dimmer STANDALONE.
jonathanprieto:
Hi Juraj, please could you show me how I could do it with interupts.
Thank you!
sorry, I am sure I could do it, but I never did it
in zero-crossing interrupt, turn AC off and activate a timed interrupt for required time and in that interrupt turn AC back on.
(and I would like to know from some expert if I could set up PWM once started at zero-crossing, it would match the AC oscillations and cut out required part of the wave)