Page 1 of 1

ok, i will post a series of code,

Posted: Wed Feb 29, 2012 10:03 am
by miked
here is my first RAgen 'main relay set up'. I will be running my koralia nanos and maxijet all the time with feed mode and water change mode set to turn them off. they are not controllable. what i intended with the code.
Port 1 - power for White LED channel on duo 700 driver (will be controled analog 0-10v when i figure it out)
Port 2 - power for Blue LED channel on duo 700 driver (will be controled analog 0-10v when i figure it out)
Port 3 - power for fan built into led lights to cool them.(turn on/off based on LED on/off when i figure it out)
LED ports should allways be on b/c the analog signal will read 0v when off. is there any reason to have Port 1 and 2 turn off when the analog signal is at 0v?
Port 4 - power for the heater. (would like to use heater thermometer and have a safety off at temp>= 83F when i figure it out)
Port 5 - ATO intended to have a high and high/high set up
Port 6 - Koralia Nano
Port 7 - Koralia Nano
Port 8 - Maxijet 900
here is the code

Code: Select all

// Autogenerated file by RAGen (v1.2.1.158), (02/29/2012 10:53)
// RA_022912_1053.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
#define PWMEXPANSION
#define ENABLE_ATO_LOGGING
*/


#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>


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

    ReefAngel.FeedingModePorts = Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.WaterChangePorts = Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    ReefAngel.OverheatShutoffPorts = 0;
    ReefAngel.LightsOnPorts = 0;

    // Ports that are always on
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port7);
    ReefAngel.Relay.On(Port8);
}

void loop()
{
    // Specific functions
    ReefAngel.StandardLights(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.StandardFan(Port3);
    ReefAngel.StandardHeater(Port4);
    ReefAngel.StandardATO(Port5);
    ReefAngel.Portal("miked");

    ReefAngel.ShowInterface();
}
how does this look
my controller was ordered and I am waiting for it to arrive. I also ordered the wifi attachment.

thanks

Re: ok, i will post a series of code,

Posted: Wed Feb 29, 2012 10:30 am
by rimai
According to your code, you have Heater on Port4 and not 5.
Port 5 has ATO.
The Fan function is really meant for those that want to have a surface fan to cool down water.
Choose standardlights for that port, so it will turn on/off according to your light schedule.
You can use port 1 and 2 the way it is now or you can use as always on. The way it is now, they will turn off if not within the light schedule. It's up to you. Either/or will work for you.

Re: ok, i will post a series of code,

Posted: Wed Feb 29, 2012 10:34 am
by miked
thank you. I put the fan on the standard light mode so it will turn on and off with my lights. I will have the light ports turned on prior to my LED ramp up and off after it ramps down. I missed 4 completely as a typo and will fix it.

thanks again