Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#1 Post by leachimtrebron » 23 Dec 2019, 17:21

Hello everybody,

Task:
Turn on a GPIO every minute for 5 seconds.

Is installed:
ESP_Easy_mega-20191208_normal_ESP8266_4M1M.bin

Built ruls:

On start-gpio14 do
    Long Pulse, 14,1,5
endon

on Clock#Time = All,**:1 do
       start-gpio14
endon


Problem:

The GPIO is not switched
Can you give me a tip?

Thank you

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

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#2 Post by grovkillen » 23 Dec 2019, 19:05

Event is needed. And no spaces in the command
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:

HomeJCL
Normal user
Posts: 89
Joined: 03 Feb 2018, 10:42

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#3 Post by HomeJCL » 23 Dec 2019, 20:33

Havé you declared the switch in Devices ?
Belgium and land of ESP ... counting :D

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#4 Post by leachimtrebron » 24 Dec 2019, 12:27

yes they are declared otherwise the http version would not work

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#5 Post by leachimtrebron » 24 Dec 2019, 12:32

@homejcl: Thank you very much, could you please show me an example of what such an event should look like?

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

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#6 Post by grovkillen » 24 Dec 2019, 18:26

Code: Select all

On start-gpio14 do
    LongPulse,14,1,5
endon

on Clock#Time=All,**:*1 do
       Event,start-gpio14
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:

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#7 Post by leachimtrebron » 25 Dec 2019, 15:07

@grovkillen :


I have taken the source code into my Ruls
On startgpio14 do
LongPulse,14,1,5
endon

on Clock#Time=All,**:*1 do
Event,startgpio14
endon

and rebooted esp No response on GPIO13
I use the image:
ESP_Easy_mega-20191208_normal_ESP8266_4M1M.bin

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

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#8 Post by grovkillen » 25 Dec 2019, 15:08

You're very confusing, GPIO 13 or 14?
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:

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#9 Post by leachimtrebron » 25 Dec 2019, 18:14

sorry its gpio14

Code: Select all

on Clock#Time=All,**:*1 do
Event,startgpio14
endon
doesn't seem to work for me

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

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#10 Post by grovkillen » 25 Dec 2019, 18:38

That syntax will be triggered at every hour at minut 01, 11, 21....51

Not every minute.
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:

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#11 Post by leachimtrebron » 26 Dec 2019, 15:03

@grovkillen
Thanks

Wie ist die Syntax mit dem ich jede Minute einen Event auslösen kann?

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

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#12 Post by grovkillen » 26 Dec 2019, 16:45

Either use a timer or use the syntax **:** which will trigger every minute.
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:

leachimtrebron
Normal user
Posts: 24
Joined: 12 Mar 2018, 20:11

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#13 Post by leachimtrebron » 26 Dec 2019, 18:16

Thanks for the hint.

what does it look like if you want to trigger an event every 3 or every 8 minutes
Could you put some examples in the wiki? This could also help other users.

THANKS for your help

Clock # Time =

All, **: ** ==> every minute
All, **: ** ==> 1 1,11,21,31,41,51 minute
All, **: * 5 ==> 5,15,25,35,45,55 minute
All, **: 30 ==> 00 and 30 minutes
Mon, 7:30 p.m. ==> every Monday at 7:30 p.m.

All,% sunrise% ==> sunrise (*)
All,% sunset% ==> sunset (*)
(*) write under Tools / Advanced Settings / Location Settings

I have not yet understood the following:
What does it look like if you only want to trigger an event every 14 days on Monday?

or an event every 4 weeks on the first Monday?

Are there other options?

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

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

#14 Post by grovkillen » 26 Dec 2019, 19:00

You would use dummy variables. And you can use clock together with timers. So it's really up to you what your plans look like. You have the week day number that you can use and for each Monday you add one to the dummy. When it's = 4 you execute the code. Next Monday you reset it to 1.
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:

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests