That's some nice coding

I'm impressed on how you picked up on the coding so quick!!!
I don't see anything wrong or out of ordinary.
Can you test the ports with this code?
Code: Select all
#include <Salinity.h>
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>
int port=0;
void setup()
{
ReefAngel.Init();
}
void loop()
{
/*
This code will display:
Temperature probes
pH probe
Daylight PWM % (if the feature is enabled)
Actinic PWM % (if the feature is enabled)
Relay box
Time/Date
ATO port status
It will blink the red status LED and increment the PWM % every second.
Moving or pressing the joystick will activate another port in the relay box.
*/
if (ReefAngel.Joystick.IsUp() || ReefAngel.Joystick.IsRight()) port++;
if (ReefAngel.Joystick.IsButtonPressed()) port++;
if (ReefAngel.Joystick.IsDown() || ReefAngel.Joystick.IsLeft()) port--;
if (port>7) port=0;
if (port<0) port=7;
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,10,"Port On");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,45,10,port+1);
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,20,"Low ATO");
if (ReefAngel.LowATO.IsActive())
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,65,20,"Closed");
else
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,65,20,"Open ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,30,"High ATO");
if (ReefAngel.HighATO.IsActive())
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,70,30,"Closed");
else
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,70,30,"Open ");
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,15,40,"Status LED ");
if (now()%2==0)
{
ReefAngel.LED.On();
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,80,40,"On ");
}
else
{
ReefAngel.LED.Off();
ReefAngel.LCD.DrawText(DefaultFGColor,DefaultBGColor,80,40,"Off");
}
ReefAngel.Relay.RelayData=1<<port;
//Box1_Port
ReefAngel.Relay.RelayDataE[0]=1<<port;
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.PWM.SetActinic(now()%100);
ReefAngel.PWM.SetDaylight(now()%100);
ReefAngel.LCD.DrawMonitor(15, 70, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 70, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawOutletBox(12, 103, ReefAngel.Relay.RelayData);
ReefAngel.LCD.DrawDate(6, 122);
ReefAngel.Relay.Write();
ReefAngel.Refresh();
}
Roberto.