I've built a system to dim three lamps (AC) and control three stepper motors. What I want to do is like:
If ldr < setpoint Open the blind 1/2(using stepper motor) If still ldr < setpoint Open blind full If still ldr < setpoint brighten the lamp If ldr > setpoint Dim the lamp If still ldr > setpoint close blind 1/2 If still ldr> setpoint close blind full
I've built the following code:
(attachment)
If I do not connect the motors (mean dim/brighten the lamps only), this code works very well. But when I connect the motors, everything mess up. Please, I really need help. I just don't know what to do again.
Thanks.