Basic On/Off Function?

Requests for new functions or software apps
Post Reply
kirkwood
Posts: 173
Joined: Mon Apr 29, 2013 6:50 am

Basic On/Off Function?

Post by kirkwood »

Every 5.5 hours I want port 5 to turn on/off. The power only needs to be cut off for a couple seconds and then turn back on.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Basic On/Off Function?

Post by rimai »

Try this:

Code: Select all

ReefAngel.Relay.Set(Port5,now()%19800==0);
Roberto.
kirkwood
Posts: 173
Joined: Mon Apr 29, 2013 6:50 am

Re: Basic On/Off Function?

Post by kirkwood »

1) So does Port 5 need to be listed as an "ALWAYS ON" port?

2) Do I paste the code in the custom code area?


Currently I have Port 5 set as an "ALWAYS ON" port and pasted the code in the custom code section. And now for some reason the default of Port 5 is to be OFF? So I have to mask it to turn it on. I figured that I'm doing something wrong.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Basic On/Off Function?

Post by rimai »

You can remove the always on code if you want to. Leaving it won't do anything either... So your choice.
I misread your question. I thought you wanted the opposite :(
Try this then:

Code: Select all

ReefAngel.Relay.Set(Port5,now()%19800!=0);
Roberto.
Post Reply