DIY Reef Controller

There are other companys this seems to be less expensive and has a support forum and it is not the first time somthing like has been suggested in this forum
Also the software is free




MARC
 
Hmmmm...I am unsure what that error message means.

I'm using version 1.04 .

Aquapporn,I'm getting errors when I try to compile your sketch.
This is the part that is giving me problems.
Attached is the errors as I see them when I try to compile the sketch.
It's probibly something stupid.
//******** Call Fonts **********
extern uint8_t arial_bold[];
extern uint8_t SevenSegmentFull[];
 

Attachments

  • error.JPG
    error.JPG
    91.8 KB · Views: 5
steve
attach a zip file to your post so everyone has the latest code I had a lot of requests for it and some have the version you gave me the first time

Marc
 
Aquapporn,I'm getting errors when I try to compile your sketch.
This is the part that is giving me problems.
Attached is the errors as I see them when I try to compile the sketch.
It's probibly something stupid.
//******** Call Fonts **********
extern uint8_t arial_bold[];
extern uint8_t SevenSegmentFull[];

For the people like me that didn't know . You download the fonts for arduino and place them in the sketch directory...

DUHHHHHHH!!!!!!!
 
Sorry about that Shark...I had thought I included those fonts in the UTFT library.

Here is everything minus the library's as they are too big even zipped.

Just need to drop the fonts into your UTFT library individually....not the whole folder.
 

Attachments

Will have an update ready in a day or 2. I'm just working out a bug or 2 in the LED program. You will be able to set sunrise/sunset time, and will be able to override to use the dimming control.

After that I will be working on the moon phase, weather, coral acclimation in that order.
 
Will have an update ready in a day or 2. I'm just working out a bug or 2 in the LED program. You will be able to set sunrise/sunset time, and will be able to override to use the dimming control.

After that I will be working on the moon phase, weather, coral acclimation in that order.

Thanks for the updated sketch and appreciate you sharing with us.
 
I'm having another problem now. I have a ITDB02-50 screen with the IC mega shield. I did have Nick's sketch running on my screen and had calibrated it. Since then I have installed the Reef Angel software, Arduino ver2.4, ver 1.4 and 1.5. I'm pretty sure I had it running on ver 1.0.

Anyway I have forgotten how to fix the calibration problem with the 5.0 screen. I can run the ITB02_Touch sketch and the UTouch. Both work fine and give me the numbers to change. I've changed the resolution on
ITDB02_Touch.cpp from 320 x 200 to 800 x 480.... Anyway does anyone here know how to do it.
I'm getting tired of pushing the same places on my 5.0 screen, got dents in it now and have never ran the program on my tank.. LOL
 
Got my pH probe delivered today. Set it up to work with a ph amplifier circuit I build and connected it up to the arduino. Works great!! :)
 
AquaPorn for adding a lunar cycle I see alot of people use Night at the opera code for doing it ....

This is a function you can use in your Arduino sketches for calculating the current lunar phase. The function, GetPhase, takes three parameters: the year, the month and the day. Note that the year must be 4 digits. The function returns a float type containing the percentage of illumination (0 for new, .25 for crescent, .5 for quarter, .75 for gibbous and 1 for full). You can then set your lunar light PWM pin to 255 multiplied by the returned percentage to simulate current moon phase lunar lighting. In future I'd like to beef up this function to reflect percentages between phases instead of always returning 0, .25, .50, .75 or 1.

In order to use this function you will need a realtime clock module such as the DS1307 so that you can obtain the current date
 
Following are the functions GetPhase and MyNormalize (which is called by GetPhase)

float GetPhase(int nYear, int nMonth, int nDay) // calculate the current phase of the moon
{
float phase;
double AG, IP;
long YY, MM, K1, K2, K3, JD;
YY = nYear - floor((12 - nMonth) / 10);
MM = nMonth + 9;
if (MM >= 12)
{
MM = MM - 12;
}
K1 = floor(365.25 * (YY + 4712));
K2 = floor(30.6 * MM + 0.5);
K3 = floor(floor((YY / 100) + 49) * 0.75) - 38;
JD = K1 + K2 + nDay + 59;
if (JD > 2299160)
{
JD = JD - K3;
}
IP = MyNormalize((JD - 2451550.1) / 29.530588853);
AG = IP*29.53;
phase = 0;
if ((AG < 1.84566) && (phase == 0))
{
phase = 0; //new; 0% illuminated
}
if ((AG < 5.53699) && (phase == 0))
{
phase = .25; //Waxing crescent; 25% illuminated
}
if ((AG < 9.922831) && (phase == 0))
{
phase = .50; //First quarter; 50% illuminated
}
if ((AG < 12.91963) && (phase == 0))
{
phase = .75; //Waxing gibbous; 75% illuminated
}
if ((AG < 16.61096) && (phase == 0))
{
phase = 1; //Full; 100% illuminated
}
if ((AG < 20.30228) && (phase == 0))
{
phase = .75; //Waning gibbous; 75% illuminated
}
if ((AG < 23.99361) && (phase == 0))
{
phase = .50; //Last quarter; 50% illuminated
}
if ((AG < 27.68493) && (phase == 0))
{
phase = .25; //Waning crescent; 25% illuminated
}
if (phase == 0)
{
phase = 0; //default to new; 0% illuminated
}
return phase;
}

double MyNormalize(double v)
{
v = v - floor(v);
if (v < 0)
v = v + 1;
return v;
}
 
Aqua, this is Isaac Croas from youtube, I just wanted to express my gratitude and sincere thanks for all the help you've given me so far with the hardware on your channel.

Thanks!!!!
 
Back
Top