Basic On/Off Function?

Requests for new functions or software apps

Posts: 164
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Thu Oct 03, 2013 10:06 am
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

Posts: 12247
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Thu Oct 03, 2013 10:11 am
Try this:
Code: Select all
ReefAngel.Relay.Set(Port5,now()%19800==0);
Roberto.

Posts: 164
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Fri Oct 04, 2013 7:20 am
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

Posts: 12247
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri Oct 04, 2013 7:50 am
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.

Return to Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron