toggling a port
Posted: Sun Mar 04, 2012 6:41 pm
looking for a post on just toggling a port at certain times. I will use it switch on\off my salt water reservoir barrel. Saw this, is there a better way?
Even better would be an entry in my "soon to be built" custom main menu that allowed me to override, start, and stop this function.dmolton wrote: You can use the StandardLights function in your RA PDE sketch file to control on/off times for you LEDs.
the function looks like this:
StandardLights(byte LightsRelay, byte OnHour, byte OnMinute, byte OffHour, byte OffMinute)
so you inside the loop() function of your sketch the line will look something similar to this:The above line will turn on Port 2 at 10:00 AM and turn it off at 9:30 PMCode: Select all
ReefAngel.StandardLights(2,10,0,21,30);