I have attached code for an enhanced RATempSensor class. It should be fully compatible with all existing code but it includes an additional function, RemapSensors.
I added this function because when I changed some of my temperature probes, they came out in a different order than I wanted them to and since some had long cords and others had short cords I couldn't just rearrange them. RemapSensors changes which physical probe is T1, T2, T3 and so forth.
To use it, call it right after ReefAngel.Init().
As an example:
Code: Select all
byte sensorMap[3] = {2, 0, 1};
ReefAngel.TempSensor.RemapSensors(sensorMap);
For some examples
{0, 0, 0} will cause T1, T2, and T3 to all read the probe that would previously have been T1.
{0, 1, 2} leaves everything alone, but if you want to do that, just don't make the call.
The array can include 6 numbers if you have the extra sensors defined in the code.
So the example