How can I make this fit?

Do you have a question on how to do something.
Ask in here.

Posts: 19
Joined: Fri May 16, 2014 4:25 pm
PostPosted: Sun May 25, 2014 12:23 pm
I just have an RA and not an RA+. I was wondering if there was any way to make the following code fit?
[code#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


////// Place global variable code above here


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 1000 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port8 );

////// Place additional initialization code below here


////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardLights( Port2,20,0,8,0 );
ReefAngel.StandardHeater( Port3,760,780 );
ReefAngel.CO2Control( Port6,810,840 );
ReefAngel.StandardLights( Port7,8,0,20,0 );
ReefAngel.PWM.SetChannel( 0, PWMParabola(8,0,20,0,0,80,0) );
ReefAngel.PWM.SetChannel( 1, PWMParabola(8,0,20,0,0,80,0) );
ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,0,80,0) );
////// Place your custom code below here


////// Place your custom code above here

// This should always be the last line
ReefAngel.Portal( "morn623" );
ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
int x,y;
char text[10];
// Dimming Expansion
x = 15;
y = 2;
for ( int a=0;a<6;a++ )
{
if ( a>2 ) x = 75;
if ( a==3 ) y = 2;
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
y += 10;
}
pingSerial();

// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
pingSerial();

// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}

void DrawCustomGraph()
{
}
][/code]
If this can't be made to fit, I have two questions...
Is there any way to just upgrade the memory on the RA without getting the board upgrade?
If not, does anyone know if the old LCD screen is compatible with the board upgrade?

Posts: 213
Joined: Mon Apr 01, 2013 7:58 pm
PostPosted: Sun May 25, 2014 1:16 pm
There's no way to just upgrade memory, as it's part of the processor. The lcd will work fine. Just swap out board. As for the coding. Ill wait for the pros to speak up
User avatar
Posts: 2749
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sun May 25, 2014 2:49 pm
what version of the libraries are you using? you may have to downgrade to and older version of the libraries to make it fit. version 1.1.0 is large and i am not sure if it can still fit on a standard controller. you may want to try 1.0.9 or even lower to make it fit. others may have additional input.


Sent from my iPad mini

Posts: 19
Joined: Fri May 16, 2014 4:25 pm
PostPosted: Sun May 25, 2014 6:25 pm
Where can I find the older libraries?
User avatar
Posts: 2749
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sun May 25, 2014 6:41 pm
morn623 wrote:Where can I find the older libraries?

they are located on github.
https://github.com/reefangel/Libraries
you can download the older releases and test them out.

Sent from my Moto X

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 3 guests

cron