Coding for Fresh Water Tank.

Do you have a question on how to do something.
Ask in here.
Post Reply
abhi_123
Posts: 217
Joined: Tue Mar 20, 2012 8:34 am

Coding for Fresh Water Tank.

Post by abhi_123 »

Hi I am planning to use my reef angel controller to control my 2 planted tank.

i will be using this code
// Autogenerated file by RAGen (v1.2.2.171), (06/02/2013 11:59)
// RA_060213_1159.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define wifi
#define SIMPLE_MENU
*/


#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 <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 = Port5Bit | Port6Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;

    // Ports that are always on
    ReefAngel.Relay.On(Port5);
    ReefAngel.Relay.On(Port7);
    ////// Place additional initialization code below here
    

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

void loop()
{
    // Specific functions that use Internal Memory values
    ReefAngel.MHLights(Port1);
    ReefAngel.MHLights(Port2);
    ReefAngel.StandardFan(Port3);
    ReefAngel.StandardFan(Port4);
    ReefAngel.Wavemaker1(Port6);
    ReefAngel.StandardHeater(Port8);
    ////// Place your custom code below here
    

    ////// Place your custom code above here
    // This sends all the data to the portal
    // Do not add any custom code that changes any relay status after this line
    // The only code after this line should be the ShowInterface function
    ReefAngel.Portal("abhi_123", "75HRSNAHMLYUS");

    // This should always be the last line
    ReefAngel.ShowInterface();
}
Port no. 1 & 2 will be used for the lights, 3 & 4 will be either chiller or fan, 5 & 6 are filteration, 7 will be to control Co2 or Ph, 8 will be for heater.

I want to set the timing of light between 9:00 am to 6:00 pm, fans & heaters to be set as to maintain temp between the range of 24 degree to 27 degree, ph to be around 6.8.

What amendment is required in above code to work as it.
Image
rossbryant1956
Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD

Re: Coding for Fresh Water Tank.

Post by rossbryant1956 »

I use the wizard as a starting place for all my new code ideas, then edit it (or ask questions) to get that last mile done. Try it. Thx
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.
abhi_123
Posts: 217
Joined: Tue Mar 20, 2012 8:34 am

Re: Coding for Fresh Water Tank.

Post by abhi_123 »

Thanks for the advice but tool option of my arduino is not opening.
Image
Post Reply