Page 1 of 1

demo code

Posted: Tue Jan 31, 2012 10:36 am
by woods4542000
Im trying just to change the demo code in ragen to have wavemakers on all time off at water change etc. saying port 4 not declared ?
// Autogenerated file by RAGen (v1.1.0.127), (01/31/2012 12:27)
// RA_013112_1227.pde
//
// This version designed for v0.8.5 Beta 17 or later

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


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
    ReefAngel.Init();  //Initialize controller

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

void loop()
{
    // Specific functions
    ReefAngel.StandardATO(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.StandardFan(Port6);
    ReefAngel.StandardHeater(Port7);

ReefAngel.ShowInterface();
}
The basic functions work for me minus having wavemaker switch on n off, and bought the additional led moonlight , and need to figure out how to set that up as well . any help would be greatly appreciated.

Re: demo code

Posted: Tue Jan 31, 2012 10:51 am
by rimai
Make sure you convert/update your libraries to development libraries.
http://forum.reefangel.com/viewtopic.php?f=8&t=2
To use the moonlight, just add this line to your loop():

Code: Select all

    ReefAngel.PWM.SetActinic(MoonPhase());
    ReefAngel.PWM.SetDaylight(MoonPhase());

Re: demo code

Posted: Tue Jan 31, 2012 12:25 pm
by woods4542000
wow thanks a lot , now I can hook this up to my system!!!

Re: demo code

Posted: Tue Jan 31, 2012 1:09 pm
by woods4542000
Everything went well except not turning on metal halide socket?

Re: demo code

Posted: Tue Jan 31, 2012 1:13 pm
by woods4542000
Not turning off sockets 4,5,8 during water change either?

Re: demo code

Posted: Tue Jan 31, 2012 1:14 pm
by woods4542000
// Autogenerated file by RAGen (v1.1.0.127), (01/31/2012 15:04)
// RA_013112_1504.pde
//
// This version designed for v0.8.5 Beta 17 or later

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


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
    ReefAngel.Init();  //Initialize controller

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

void loop()
{
    // Specific functions
    ReefAngel.StandardATO(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.StandardFan(Port6);
    ReefAngel.StandardHeater(Port7);
    ReefAngel.PWM.SetActinic(MoonPhase());
    ReefAngel.PWM.SetDaylight(MoonPhase());

ReefAngel.ShowInterface();
}
This is what i have.

Re: demo code

Posted: Tue Jan 31, 2012 2:52 pm
by rimai
Which app are you using to change the light schedule?
For the feeding and water change mode, you need to add this inside the setup() function

Code: Select all

    ReefAngel.FeedingModePorts = B10011000;
    ReefAngel.WaterChangePorts = B10011000;

Re: demo code

Posted: Tue Jan 31, 2012 3:34 pm
by woods4542000
Wow Im so lost right now, tried changing light times in internal memory says error compiling. i did the initial memory save . tried getting reef angel client , cant get that to work. Ive been messing with this just under a week and its killing me.