- Feeding Mode
- Water Change Mode
- Overheat Shutoff Mode - triggered when the overheat temperature is met or exceeded
- Lights On Mode - triggered when Lights On menu item is selected (built in to Main menu, not in Simple menu or Custom menu (unless you add it in manually))
- Feeding - Ports 8, 6, 5
- Water Change - Ports 8, 6, 5
- Overheat Shutoff - Ports 3
- Lights On - Ports 3, 2
These are set inside your PDE/INO file. There are 2 ways to change these ports.
1. Through the wizard. The wizard will prompt you for this and do it all for you.
2. Manually add to your PDE/INO file. This is done as follows:
Code: Select all
void setup()
{
ReefAngel.Init(); //Initialize controller
// Set the ports that get toggled on & off during the following modes
// To enable a port to be toggled, place a 1 in the appropriate position
// Uncomment and update as needed
// Port 87654321
//ReefAngel.FeedingModePorts = B10110000;
//ReefAngel.WaterChangePorts = B10110000;
//ReefAngel.OverheatShutoffPorts = B00000100;
//ReefAngel.LightsOnPorts = B00000110;
// Rest of code goes here ....
}
If you are running 0.9.0 or later libraries, you can still use the above mentioned way OR you can use an easier to read way:
Code: Select all
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port8Bit;
ReefAngel.WaterChangePorts = Port5Bit | Port6Bit | Port8Bit;
ReefAngel.OverheatShutoffPorts = Port3Bit;
ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
Doing it this way is a little easier to read and edit. Both ways accomplish the same thing.
For those who have an expansion relay, you must edit your PDE/INO file manually (like option 2 above). Going along with the example above, you need to add the following to the setup for the expansion relays.
Code: Select all
// Port 87654321
ReefAngel.FeedingModePortsE[x] = B00000000;
ReefAngel.WaterChangePortsE[x] = B00000000;
ReefAngel.OverheatShutoffPortsE[x] = B00000000;
ReefAngel.LightsOnPortsE[x] = B00000000;
Code: Select all
0 - Expansion Relay 1
1 - Expansion Relay 2
2 - Expansion Relay 3
3 - Expansion Relay 4
4 - Expansion Relay 5
5 - Expansion Relay 6
6 - Expansion Relay 7
7 - Expansion Relay 8
Going off of that index example, here are some code examples:
Code: Select all
// Expansion Relay 1
// Port 87654321
ReefAngel.FeedingModePortsE[0] = B00000000;
ReefAngel.WaterChangePortsE[0] = B00000000;
ReefAngel.OverheatShutoffPortsE[0] = B00000000;
ReefAngel.LightsOnPortsE[0] = B00000000;
// Expansion Relay 2
// Port 87654321
ReefAngel.FeedingModePortsE[1] = B00000000;
ReefAngel.WaterChangePortsE[1] = B00000000;
ReefAngel.OverheatShutoffPortsE[1] = B00000000;
ReefAngel.LightsOnPortsE[1] = B00000000;
Once added to your PDE/INO file, you upload the file to the controller and now your controller will toggle those ports ON/OFF when you enter the modes.