Problem with dev library 1.0.0
Problem with dev library 1.0.0
Hey Roberto,
I downloaded the teh deve libraries this morning. When I tried uploading my new code I got an error on my Reef Angel plus that says "no internal memory found".
When I try to upload the internal memory, I get:
The following features were detected:
java.io.FileNotFoundException: C:\Users\carl\Documents\Arduino\update\feature.txt (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at java.io.FileReader.<init>(FileReader.java:41)
at processing.app.Sketch.ProcessFeature(Sketch.java:1373)
at processing.app.Sketch.build(Sketch.java:1766)
at processing.app.Sketch.build(Sketch.java:1750)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1867)
at java.lang.Thread.run(Thread.java:619)
Simple Menu
Memory_070312_0947.cpp: In function 'void setup()':
Memory_070312_0947.pde error: 'COLOR_WHITE' was not declared in this scope
Memory_070312_0947.pde error: 'InternalMemory' was not declared in this scope
Memory_070312_0947.cpp: In function 'void loop()':
Memory_070312_0947.pde error: 'InternalMemory' was not declared in this scope
Memory_070312_0947.pde error: 'COLOR_BLACK' was not declared in this scope
Memory_070312_0947.pde error: 'COLOR_WHITE' was not declared in this scope
Memory_070312_0947.pde error: 'MENU_START_COL' was not declared in this scope
Memory_070312_0947.pde error: 'MENU_START_ROW' was not declared in this scope
A search of my hard drive only locates features.txt at "C:\Users\carl\Documents\Arduino\RA_Preloaded"
I installed the new Windows installer as well, no change. Do I need to uninstall everything and try again?
I downloaded the teh deve libraries this morning. When I tried uploading my new code I got an error on my Reef Angel plus that says "no internal memory found".
When I try to upload the internal memory, I get:
The following features were detected:
java.io.FileNotFoundException: C:\Users\carl\Documents\Arduino\update\feature.txt (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at java.io.FileReader.<init>(FileReader.java:41)
at processing.app.Sketch.ProcessFeature(Sketch.java:1373)
at processing.app.Sketch.build(Sketch.java:1766)
at processing.app.Sketch.build(Sketch.java:1750)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1867)
at java.lang.Thread.run(Thread.java:619)
Simple Menu
Memory_070312_0947.cpp: In function 'void setup()':
Memory_070312_0947.pde error: 'COLOR_WHITE' was not declared in this scope
Memory_070312_0947.pde error: 'InternalMemory' was not declared in this scope
Memory_070312_0947.cpp: In function 'void loop()':
Memory_070312_0947.pde error: 'InternalMemory' was not declared in this scope
Memory_070312_0947.pde error: 'COLOR_BLACK' was not declared in this scope
Memory_070312_0947.pde error: 'COLOR_WHITE' was not declared in this scope
Memory_070312_0947.pde error: 'MENU_START_COL' was not declared in this scope
Memory_070312_0947.pde error: 'MENU_START_ROW' was not declared in this scope
A search of my hard drive only locates features.txt at "C:\Users\carl\Documents\Arduino\RA_Preloaded"
I installed the new Windows installer as well, no change. Do I need to uninstall everything and try again?
Re: Problem with dev library 1.0.0
Yes, the prefered method is installing the new installer.
The update utility will not work for this update.
http://forum.reefangel.com/viewtopic.php?f=7&t=1477
Can you try again?
The update utility will not work for this update.
http://forum.reefangel.com/viewtopic.php?f=7&t=1477
Can you try again?
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
I get this when trying to upload my pre existing code that worked before the new libs:
In file included from RA_060912_2037customNEW.cpp:18:
C:\Users\User\Documents\Arduino\libraries\Globals/Globals.h:898: error: expected unqualified-id before ')' token
RA_060912_2037customNEW:40: error: expected unqualified-id before ')' token
RA_060912_2037customNEW.cpp: In function 'void DrawCustomMain()':
RA_060912_2037customNEW:55: error: expected primary-expression before ')' token
RA_060912_2037customNEW.cpp: At global scope:
RA_060912_2037customNEW:218: error: expected unqualified-id before ')' token
In file included from RA_060912_2037customNEW.cpp:18:
C:\Users\User\Documents\Arduino\libraries\Globals/Globals.h:898: error: expected unqualified-id before ')' token
RA_060912_2037customNEW:40: error: expected unqualified-id before ')' token
RA_060912_2037customNEW.cpp: In function 'void DrawCustomMain()':
RA_060912_2037customNEW:55: error: expected primary-expression before ')' token
RA_060912_2037customNEW.cpp: At global scope:
RA_060912_2037customNEW:218: error: expected unqualified-id before ')' token
Re: Problem with dev library 1.0.0
No change. Dead in the water.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
ok I'll wait patiently...everything is still running as it should..
Just a white screen on the RA and can't upload my code...
Just a white screen on the RA and can't upload my code...
Last edited by DrewPalmer04 on Tue Jul 03, 2012 8:53 am, edited 1 time in total.
Re: Problem with dev library 1.0.0
Did you recently download from the website?carlii wrote:No change. Dead in the water.
Should be ReefAngelInstaller_1.0.0.exe
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
I did just as the instructions said to do it....just get the above error and can't upload
I'm showing 1.0.0 for lib
I'm showing 1.0.0 for lib
Re: Problem with dev library 1.0.0
I know. Your problem is different.DrewPalmer04 wrote:I did just as the instructions said to do it....just get the above error and can't upload
I'm showing 1.0.0 for lib
We'll have to wait for Curt to take a look.
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
ok sorry I'll check in later.
Re: Problem with dev library 1.0.0
I rolled back to 0.9.9. I am ok for now. I look forward to the update.
Re: Problem with dev library 1.0.0
I see now where I messed up.carlii wrote:I rolled back to 0.9.9. I am ok for now. I look forward to the update.
I'll need to repackage the installer.
It'll be up soon.
Roberto.
Re: Problem with dev library 1.0.0
Sorry Roberto, I did not read your post thoroughly. I will follow the instructions you posted originally.
Re: Problem with dev library 1.0.0
Ok. Will do. Thanks.
Re: Problem with dev library 1.0.0
Ok, I have updated the package and it is now ready for download.carlii wrote:Ok. Will do. Thanks.
Please download the latest installer and try again.
Roberto.
Re: Problem with dev library 1.0.0
I am back in business. Thanks.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
I'm not fixed?
In file included from RA_060912_2037customNEW.cpp:18:
C:\Users\User\Documents\Arduino\libraries\Globals/Globals.h:898: error: expected unqualified-id before ')' token
RA_060912_2037customNEW:40: error: expected unqualified-id before ')' token
RA_060912_2037customNEW.cpp: In function 'void DrawCustomMain()':
RA_060912_2037customNEW:55: error: expected primary-expression before ')' token
RA_060912_2037customNEW.cpp: At global scope:
RA_060912_2037customNEW:218: error: expected unqualified-id before ')' token
In file included from RA_060912_2037customNEW.cpp:18:
C:\Users\User\Documents\Arduino\libraries\Globals/Globals.h:898: error: expected unqualified-id before ')' token
RA_060912_2037customNEW:40: error: expected unqualified-id before ')' token
RA_060912_2037customNEW.cpp: In function 'void DrawCustomMain()':
RA_060912_2037customNEW:55: error: expected primary-expression before ')' token
RA_060912_2037customNEW.cpp: At global scope:
RA_060912_2037customNEW:218: error: expected unqualified-id before ')' token
Re: Problem with dev library 1.0.0
No... I told you that we need to wait for Curt to look at it.DrewPalmer04 wrote:I'm not fixed?
In file included from RA_060912_2037customNEW.cpp:18:
C:\Users\User\Documents\Arduino\libraries\Globals/Globals.h:898: error: expected unqualified-id before ')' token
RA_060912_2037customNEW:40: error: expected unqualified-id before ')' token
RA_060912_2037customNEW.cpp: In function 'void DrawCustomMain()':
RA_060912_2037customNEW:55: error: expected primary-expression before ')' token
RA_060912_2037customNEW.cpp: At global scope:
RA_060912_2037customNEW:218: error: expected unqualified-id before ')' token
I have no clue what's wrong
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
Any link for 0.9.9? So i can get my display back?
Re: Problem with dev library 1.0.0
Just remove the line that contains the MoonPhaseLabel and you will be able to compile.
Do not comment it. You need to remove it.
This way, the auto-feature selection won't find the keyword and will remove the part that is giving you problems.
Do not comment it. You need to remove it.
This way, the auto-feature selection won't find the keyword and will remove the part that is giving you problems.
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
That did it..hope you guys work it out
Re: Problem with dev library 1.0.0
Is this on the latest version on the dev branch?rimai wrote:I'm gonna need Curt's help on this one...
what code is causing the compile error? what INO file are you using to reproduce the problem?
Re: Problem with dev library 1.0.0
both on dev and master.
It's the Globals.h:898, which only has this:
Can't figure out why this is generating error now
It's the Globals.h:898, which only has this:
Code: Select all
char* MoonPhaseLabel();
Roberto.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
Any update on this?
Re: Problem with dev library 1.0.0
No, not yet. What INO file are you using?DrewPalmer04 wrote:Any update on this?
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Problem with dev library 1.0.0
My personal one with the char* MoonPhaseLabel(); for the moon cycle. I get an error after the v 1.0.0 dev libs
Re: Problem with dev library 1.0.0
Im getting this same error when I try and use char*MoonPhaseLabel() after updating to v 1.0.0...any clues?
Thanks
Thanks
Re: Problem with dev library 1.0.0
Upgrade to the new libraries and have run into the following problems:
Any help please?
All was running okay beforehand, here is my code:
The following features were automatically added:
Watchdog Timer
Version Menu
The following features were detected:
Dimming Expansion Module
Dimming Signal
RF Expansion Module
Salinity Expansion Module
Wifi Attachment
Custom Main Screen
Extra Font - Medium Size (8x8 pixels)
Extra Font - Large Size (8x16 pixels)
Moon Phase Label
Simple Menu
In file included from WiseguysReef.cpp:38:
/Users/Matthew/Documents/Arduino/libraries/Globals/Globals.h:898: error: expected unqualified-id before ')' token
In file included from WiseguysReef.cpp:58:
/Users/Matthew/Documents/Arduino/libraries/ReefAngel/ReefAngel.h:105: error: 'SalinityClass' does not name a type
WiseguysReef.cpp: In function 'void DrawCustomMain()':
WiseguysReef:205: error: expected primary-expression before ')' token
WiseguysReef.cpp: In function 'void loop()':
WiseguysReef:261: error: no matching function for call to 'RA_PWMClass::ActinicPWMSlope(int, int, int, int, int, int, int, int)'
/Users/Matthew/Documents/Arduino/libraries/RA_PWM/RA_PWM.h:35: note: candidates are: void RA_PWMClass::ActinicPWMSlope(byte)
/Users/Matthew/Documents/Arduino/libraries/RA_PWM/RA_PWM.h:37: note: void RA_PWMClass::ActinicPWMSlope()
WiseguysReef:262: error: no matching function for call to 'RA_PWMClass::DaylightPWMSlope(int, int, int, int, int, int, int, int)'
/Users/Matthew/Documents/Arduino/libraries/RA_PWM/RA_PWM.h:36: note: candidates are: void RA_PWMClass::DaylightPWMSlope(byte)
/Users/Matthew/Documents/Arduino/libraries/RA_PWM/RA_PWM.h:38: note: void RA_PWMClass::DaylightPWMSlope()
WiseguysReef:266: error: expected `;' before ')' token
Code: Select all
// Autogenerated file by RAGen (v1.2.1.158), (03/08/2012 22:54)
// RA_030812_2254.ino
//
// This version designed for v0.9.0 or later
/*
The following features are enabled for this File:
#define DisplayImages
#define OverheatSetup
#define DateTimeSetup
#define VersionMenu
#define DirectTempSensor
#define DisplayLEDPWM
#define wifi
#define SaveRelayState
#define WDT
#define PWMEXPANSION
#define CUSTOM_MAIN
#define COLORS_PDE
#define SALINITYEXPANSION
#define RFEXPANSION
#define FONT_8x8
#define FONT_8x16
Ports assignment:
Port1 - Return Pump
Port2 - Circulation Pumps
Port3 - Heater
Port4 - Skimmer
Port5 - Tunze ATO
Port6 - PWM Expansion Power Supply
Port7 - Fuge Light
Port8 - Fuge Moonlight
*/
#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 <Salinity>
#include <Memory.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <RF.h>
#include <ReefAngel.h>
//*********************************************************************************************************************************
//--------------------------------------------------- Start of Global Variables ---------------------------------------------------
// Globals Needed for Params on Custom Main
byte x,y;
char text[10];
int v;
// Globals Needed for RF Mode on Custom Main
byte vtechmode;
byte vtechspeed;
byte vtechpercent;
boolean bFeeding=false;
//------------------------------------------------------ End of Global Variables --------------------------------------------------
//*********************************************************************************************************************************
//---------------------------------------------Custom Main for PWM Expansion Module------------------------------------------------
void DrawCustomMain()
{
//Top Banner
ReefAngel.LCD.DrawLargeText(COLOR_BLACK, 255, 9, 2, "WISEGUYS' REEF");
ReefAngel.LCD.Clear(DefaultFGColor,3,11,126,11);
// Display T1 Header Text
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,10,15,"Tank");
char text[7];
// Display the T1 Temp Value
ReefAngel.LCD.Clear(255,4,26,125,41);
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE, 255, 4, 26, text, Font8x16);
pingSerial();
// Display the Salinity Header Text
ReefAngel.LCD.DrawText(COLOR_CRIMSON,255,55,15,"Sal.");
// Display the Salinity Value
ConvertNumToString(text, ReefAngel.Params.Salinity, 100);
ReefAngel.LCD.DrawLargeText(COLOR_CRIMSON, 255, 57, 26, text, Num8x16);
pingSerial();
// Display pH Header Text
ReefAngel.LCD.DrawText(COLOR_INDIGO,255,105,15,"pH");
// Display pH Value
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.DrawLargeText(COLOR_INDIGO, 255, 94, 26, text, Font8x16);
pingSerial();
//Display Alternate Temp Parameters
ReefAngel.LCD.DrawText(0,255,8,45,"Sump");
ReefAngel.LCD.Clear(255,36,45,57,52);
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T2_PROBE], COLOR_CORNFLOWERBLUE, 36, 45, 10);
ReefAngel.LCD.DrawText(0,255,72,45,"Hood");
ReefAngel.LCD.Clear(255,100,45,119,52);
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T3_PROBE], COLOR_CORNFLOWERBLUE, 100, 45, 10);
// Display Vortech MP10wES Mode Header Text
ReefAngel.LCD.Clear(DefaultFGColor,3,56,126,56);
ReefAngel.LCD.DrawText(0,255,18,60,"Vortech EcoSmart");
pingSerial();
// Display EcoSmart Mode Value & Speed %
ReefAngel.LCD.Clear(255,1,71,128,78);
vtechspeed = InternalMemory.RFSpeed_read();
vtechpercent = vtechspeed * 0.39215;
ConvertNumToString(text, vtechpercent, 1);
if (vtechmode == 0)
{
ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,16,71,"Constant-");
ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,89,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_LIMEGREEN,255,106,71,"%");
pingSerial();
}
else if(vtechmode == 1)
{
ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,20,71,"Lagoon-");
ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,85,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,102,71,"%");
pingSerial();
}
else if (vtechmode == 2)
{
ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,8,71,"Reef Crest-");
ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,97,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_GOLD,255,114,71,"%");
pingSerial();
}
else if (vtechmode == 3)
{
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,4,71,"Short Pulse-");
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,101,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_CORNFLOWERBLUE,255,118,71,"%");
pingSerial();
}
else if (vtechmode == 4)
{
ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,8,71,"Long Pulse-");
ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,97,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_PINK,255,114,71,"%");
pingSerial();
}
else if (vtechmode == 5)
{
ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,4,71,"Nutrient TM-");
ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,101,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,118,71,"%");
pingSerial();
}
else if (vtechmode == 6)
{
ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,4,71,"Tidal Swell-");
ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,101,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_MAGENTA,255,118,71,"%");
pingSerial();
}
else if (vtechmode == 9)
{
ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,28,71,"Night-");
ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,77,71,text);
ReefAngel.LCD.DrawLargeText(COLOR_WHITE,0,94,71,"%");
pingSerial();
}
// Display PMW Expansion Channel Headers and % Values
ReefAngel.LCD.Clear(DefaultFGColor,3,82,126,82);
ReefAngel.LCD.DrawText(0,255,3,85,"D:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(), COLOR_CORNFLOWERBLUE, 13, 85, 1);
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,33,85,"%");
pingSerial();
ReefAngel.LCD.DrawText(0,255,48,85,"A:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(), COLOR_CORNFLOWERBLUE, 58, 85, 1);
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,78,85,"%");
pingSerial();
ReefAngel.LCD.DrawText(0,255,92,85,"M:");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetChannelValue(0), COLOR_CORNFLOWERBLUE, 102, 85, 1);
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,122,85,"%");
pingSerial();
// Display Moon Phase during night and Sky Type During Day
if (ReefAngel.PWM.GetChannelValue(0) > 0) //If Moonlights are active
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,6,94,MoonPhaseLabel());
else
ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,6,94," Clear Skies");
pingSerial();
// Display Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(13, 104, TempRelay);
pingSerial();
//Draw Date & Time
ReefAngel.LCD.Clear(DefaultFGColor,3,118,126,118);
ReefAngel.LCD.DrawDate(6, 120);
pingSerial();
}
void DrawCustomGraph() // Not Used
{
}
//------------------------------------------------------ End Custom Main ----------------------------------------------------------
//*********************************************************************************************************************************
//-------------------------------------------------------- Begin Setup ------------------------------------------------------------
void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.FeedingModePorts = Port2Bit | Port4Bit; // Turn off Port2 and Port4 when feeding mode is activated
ReefAngel.WaterChangePorts = Port2Bit | Port4Bit | Port5Bit; // Turn off Port2, Port4 and Port5 when water change mode is actived
ReefAngel.OverheatShutoffPorts = Port3Bit | Port7Bit;
ReefAngel.LightsOnPorts = Port7Bit;
// Ports that are always on
ReefAngel.Relay.On(Port1);
ReefAngel.Relay.On(Port2);
ReefAngel.Relay.On(Port3);
ReefAngel.Relay.On(Port6);
vtechmode = InternalMemory.RFMode_read();
}
//---------------------------------------------------------- End Setup ------------------------------------------------------------
//*********************************************************************************************************************************
//--------------------------------------------------------- Begin Loop ------------------------------------------------------------
void loop()
{
// Specific functions
ReefAngel.Relay.DelayedOn(Port4, 1); // Turn on Port 4 (Skimmer) with 1 minute delay
ReefAngel.Relay.DelayedOn(Port5, 2); // Turn on Port 5 (Tunze ATO) with 2 minute delay
ReefAngel.StandardLights(Port8); //Fuge Moonlight on when main lights are on
ReefAngel.StandardLights(Port7,20,30,8,30); //Fuge Light on at night
ReefAngel.StandardHeater(Port3); // Standard Heater Using Internal Memory
// LED FunctionsPWMSlope based on Internal Memory values for Standard Lights
ReefAngel.PWM.ActinicPWMSlope(8,30,21,30,25,80,120,0); //Set Blue LED during daytime, off at night
ReefAngel.PWM.DaylightPWMSlope(8,45,21,15,25,80,120,0); //Set White LED during daytime, off at night
if ((hour() >=8 && minute() >=30) || (hour() <= 20 && minute() <30))
ReefAngel.PWM.SetChannel(0,0); // Turn off moonlights during daytime
else
ReefAngel.PWM.SetChannel(0,MoonPhase())); // Set Moonlights to MoonPhase during night hours
// Fan Speed Functions
signed int HoodFanSpeed;
HoodFanSpeed=map(ReefAngel.Params.Temp[3],750,900,25,100); // Calculate Hood Fan speed
HoodFanSpeed=constrain(HoodFanSpeed,0,100);
ReefAngel.PWM.SetChannel(1,HoodFanSpeed);
signed int BlowerFanSpeed;
BlowerFanSpeed=map(ReefAngel.Params.Temp[1],775,800,25,100); // Calculate Blower Fan speed
BlowerFanSpeed=constrain(BlowerFanSpeed,0,100);
ReefAngel.PWM.SetChannel(2,BlowerFanSpeed);
/*
------------------------------------------------ Start Time-of-Day Based Functions ----------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These are the mode numbers for the RF Expansion Module for reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#define Constant 0
#define Random1 1 // Lagoonal
#define Random2 2 // Reef Crest
#define ShortWave 3
#define LongWave 4
#define Smart_NTM 5 // Nutrient Transport Mode
#define Smart_TSM 6 // Tidal Swell Mode
#define Feeding_Start 7
#define Feeding_Stop 8
#define Night 9
#define Slave_Start 97
#define Slave_Stop 98
#define None 99
RF Mode = http://YOURIPADDRESS:2000/mb855,X
RF Speed = http://YOURIPADDRESS:2000/mb856,X
RF Duration = http://YOURIPADDRESS:2000/mb857,X
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//-------------------------------------------------------- Start RF Smart Nutrient Mode After Feeding ---------------------------
if ((hour() >=8 && minute() >=30) || (hour() <= 20 && minute() <30))
{
if (vtechmode == 9)
{
ReefAngel.RF.UseMemory=true;
vtechmode = InternalMemory.RFMode_read();
}
if (ReefAngel.DisplayedMenu==FEEDING_MODE) bFeeding=true;
if (ReefAngel.DisplayedMenu==DEFAULT_MENU && bFeeding)
{
bFeeding=false;
ReefAngel.Timer[1].SetInterval(600); // Timer for 10min
ReefAngel.Timer[1].Start();
ReefAngel.RF.UseMemory=false;
ReefAngel.RF.SetMode(Smart_NTM,200,6);
vtechmode = 5;
}
if (ReefAngel.DisplayedMenu==DEFAULT_MENU && ReefAngel.Timer[1].IsTriggered())
{
ReefAngel.RF.UseMemory=true;
vtechmode = InternalMemory.RFMode_read();
}
}
else
{
ReefAngel.RF.UseMemory=false;
ReefAngel.RF.SetMode(Night,15,0);
vtechmode = 9;
}
//---------------------------------------------------------- End RF Smart Nutrient Mode After Feeding -----------------------------
ReefAngel.Portal("mvwise");
ReefAngel.ShowInterface();
}
//--------------------------------------------------------------- End Loop --------------------------------------------------------
//*********************************************************************************************************************************