led dimmen

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
pet
Normal user
Posts: 4
Joined: 06 Jun 2019, 21:12

led dimmen

#1 Post by pet » 06 Jun 2019, 21:26

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

pet
Normal user
Posts: 4
Joined: 06 Jun 2019, 21:12

Re: led dimmen

#2 Post by pet » 07 Jun 2019, 12:28

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

:D

User avatar
grovkillen
Core team member
Posts: 3332
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: led dimmen

#3 Post by grovkillen » 07 Jun 2019, 12:32

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

ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

pet
Normal user
Posts: 4
Joined: 06 Jun 2019, 21:12

Re: led dimmen

#4 Post by pet » 07 Jun 2019, 16:56

i testet :

on LS#State=1 do
if [PIR#State]=1
PWM,13,500,5000 // stay at this point - 5s on -5s off ................. :oops:
PWM,13,500
else
PWM,13,0,5000
endif
endon

pet
Normal user
Posts: 4
Joined: 06 Jun 2019, 21:12

Re: led dimmen

#5 Post by pet » 07 Jun 2019, 17:44

PWM,13,500 // ok

PWM,13,500,5000 // something is not right ! alls would crash the esp :oops:

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests