Page 1 of 1
led dimmen
Posted: 06 Jun 2019, 21:26
by pet
Hello everybody,
I would like to drive a led slow (5 sec) high with PIR. then she should stay on. and slowly go out again.
Esp Easy prgramm !?
PWM,gpio,500,5000 is after 5 sec out . not good
Re: led dimmen
Posted: 07 Jun 2019, 12:28
by pet
more infos of problem
Rule :
LS = ligt sensor
on LS#State=1 do
if [PIR#State]=1
PWM,13,500,5000 // light goes up 0-500 in 5s and then off ,and then the same again ( I would like on !)
else
PWM,13,0 // light goes off ( i would like slowly off - from 500 -0 )
endif
endon
Re: led dimmen
Posted: 07 Jun 2019, 12:32
by grovkillen
Tried this?
Code: Select all
on LS#State=1 do
if [PIR#State]=1
PWM,13,500,5000 // light goes up 0-500 in 5s and then off ,and then the same again ( I would like on !)
PWM,13,500
else
PWM,13,0,5000
endif
endon
Re: led dimmen
Posted: 07 Jun 2019, 16:56
by pet
i testet :
on LS#State=1 do
if [PIR#State]=1
PWM,13,500,5000 // stay at this point - 5s on -5s off .................
PWM,13,500
else
PWM,13,0,5000
endif
endon
Re: led dimmen
Posted: 07 Jun 2019, 17:44
by pet
PWM,13,500 // ok
PWM,13,500,5000 // something is not right ! alls would crash the esp