I recently upgraded my old RA with RA+ motherboard ... but on the new MB the old LCD not work ...
Any idea?
This is my code:
Code: Select all
#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 <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>
////// Place global variable code below here
boolean ATOerror=false;
////// Place global variable code above here
/********* configurazione di porte **************
port1: luce alba/tramonto (4000k / 3000k)
port2: luce notturna (led blu)
port3: Luce diurna (6000K - plafoniera)
port4: Pompe acqua (filtro e circuito co2 / raffreddamento)
port5: Elettrovalvola CO2
port6: Sistema di raffreddamento (condizionatore + ventole)
port7: Riscaldatore
port8: Pompa rabbocco automatico
*****************************************/
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddPHExpansion(); // pH Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port3Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit | Port5Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 300 );
// Ports that are always on
ReefAngel.Relay.On( Port4 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardHeater( Port7,245,255 );
ReefAngel.StandardFan( Port6,260,275 );
ReefAngel.PWM.SetDaylight( MoonPhase() );
ReefAngel.PWM.SetActinic( MoonPhase() );
////// Place your custom code below here
// luci diurne
if (hour()<12) { //
ReefAngel.StandardLights( Port1,7,30,12,0 ); // lampada singola
ReefAngel.StandardLights( Port3,8,0,11,30 ); // plafoniera
} else {
ReefAngel.StandardLights( Port1,20,0,22,00 ); // lampada singola
ReefAngel.StandardLights( Port3,16,0,21,00 ); // plafoniera
}
// luce notturna - Moonlights
if ( hour() >= 21 && hour () <= 24 ) {
ReefAngel.StandardLights( Port2,20,50,23,59 );
} else if ( hour() >= 4 && hour () <= 8 ) {
ReefAngel.StandardLights( Port2,5,00,8,00 );
} else {
ReefAngel.Relay.Off( Port2 );
}
// ReefAngel.PHControl( Port5,690,822 );
if (ReefAngel.Params. PH >= 725 ) {
ReefAngel.Relay.On(Port5); // If sensor PH <= HighPH - turn on the CO2
} else if (ReefAngel.Params. PH <= 680) {
ReefAngel.Relay.Off(Port5); // If sensor PH <= HighPH - turn off the CO2
} else {
ReefAngel.StandardLights( Port5,7,0,20,00 ); // If sensor is beetween HighPH and LowPH - turn on the CO2 from 7:00 to 20:00
}
// LowATO = Tanica vuota, spengo la pompa se no si rovina
// HighATO = Troppo pieno fermo la pompa prima di fare disastri
if(!ReefAngel.LowATO.IsActive() || !ReefAngel.HighATO.IsActive()) {
ReefAngel.LowATO.StopTopping();
ReefAngel.HighATO.StopTopping();
ReefAngel.Relay.Off(Port8);
//ReefAngel.LED.On();
ATOerror = true;
} else {
ReefAngel.WaterLevelATO(Port8,300,88,95); // 120 seconds timeout, turn on at 88% and turn off at 95%}
ATOerror = false;
}
// This should always be the last line
ReefAngel.AddWifi();
ReefAngel.ShowInterface();
}