I'm totally lost

New members questions
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

I'm totally lost

Post by budhaboy »

I've been trying all evening to figure all this out - I eventually opened the wizard, after installing the library update installer and though it, created this
#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.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 = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port3Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 815 );


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port3 );
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port7 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

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

void loop()
{
    ReefAngel.StandardHeater( Port1,770,795 );
    ReefAngel.PWM.SetDaylight( MoonPhase() );
    ReefAngel.PWM.SetActinic( MoonPhase() );
    ReefAngel.PWM.SetChannel( 0, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 1, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,15,100,15) );
    ReefAngel.PWM.SetChannel( 3, PWMParabola(8,0,20,0,15,100,15) );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Dimming Expansion
    x = 15;
    y = 2;
    for ( int a=0;a<6;a++ )
    {
      if ( a>2 ) x = 75;
      if ( a==3 ) y = 2;
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
      y += 10;
    }
    pingSerial();

    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}
but I cant get it to upload. What am I doing wrong?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

What do you get when you try to upload?
Do you have RA or RA+?
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

sketch_may11a.cpp: In function 'void setup()':
sketch_may11a:36: error: 'ReefAngel' was not declared in this scope
sketch_may11a:40: error: 'Port2Bit' was not declared in this scope
sketch_may11a:40: error: 'Port3Bit' was not declared in this scope
sketch_may11a:44: error: 'Port1Bit' was not declared in this scope
sketch_may11a:46: error: 'T1_PROBE' was not declared in this scope
sketch_may11a:49: error: 'InternalMemory' was not declared in this scope
sketch_may11a:53: error: 'Port2' was not declared in this scope
sketch_may11a:54: error: 'Port3' was not declared in this scope
sketch_may11a:55: error: 'Port4' was not declared in this scope
sketch_may11a:56: error: 'Port5' was not declared in this scope
sketch_may11a:57: error: 'Port6' was not declared in this scope
sketch_may11a:58: error: 'Port7' was not declared in this scope
sketch_may11a:59: error: 'Port8' was not declared in this scope
sketch_may11a.cpp: In function 'void loop()':
sketch_may11a:69: error: 'ReefAngel' was not declared in this scope
sketch_may11a:69: error: 'Port1' was not declared in this scope
sketch_may11a:70: error: 'MoonPhase' was not declared in this scope
sketch_may11a:72: error: 'PWMParabola' was not declared in this scope
sketch_may11a.cpp: In function 'void DrawCustomMain()':
sketch_may11a:96: error: 'ReefAngel' was not declared in this scope
sketch_may11a:96: error: 'COLOR_DARKGOLDENROD' was not declared in this scope
sketch_may11a:96: error: 'DefaultBGColor' was not declared in this scope
sketch_may11a:101: error: 'pingSerial' was not declared in this scope
sketch_may11a:108: error: 'ReefAngel' was not declared in this scope
I have the RA
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

It seems you are missing something in your libraries.
Can you delete the folder "Documents\Arduino\libraries" or rename it to another name and use the update utility again?
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

okay, so I blew everything away on my PC and reinstalled it all - created a sketch via the "wizard" function in the Arduino prog...everything "seemed" to work this time from the PC's POV, and it compiled and seemed to upload fine, except now my RA reads "No Internal Memory Found"

Is there something I needed to do with the RA' memory, before uploading this sketch?
(the only thing I did different was leave the #5&6 ports off, and add the moonlights to port #4 & 5 on the PWM Expansion Module)
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: I'm totally lost

Post by binder »

You need to upload the InternalMemory sketch first. Then reload the Code sketch.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

binder wrote:You need to upload the InternalMemory sketch first. Then reload the Code sketch.
would that be found under File/Sketchbook/ExampleCodes/InitialMemory ?

ah cool, thank you.
lets try this again....
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

okay, so I got the sketch to load, but now I have no access to the PWM, and the LEDs are flaashing like a girls girls girls sign outside a strip club...I think I goofed somewhere...
#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.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 = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 815 );


// Ports that are always on
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );

////// Place additional initialization code below here


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

void loop()
{
ReefAngel.StandardHeater( Port1,770,795 );
ReefAngel.PWM.SetDaylight( MoonPhase() );
ReefAngel.PWM.SetActinic( MoonPhase() );
ReefAngel.PWM.SetChannel( 0, PWMParabola(8,30,19,30,15,100,15) );
ReefAngel.PWM.SetChannel( 1, PWMParabola(8,30,19,30,15,100,15) );
ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,15,100,15) );
ReefAngel.PWM.SetChannel( 3, PWMParabola(8,0,20,0,15,100,15) );
////// Place your custom code below here


////// Place your custom code above here

// This should always be the last line
ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
int x,y;
char text[10];
// Dimming Expansion
x = 15;
y = 2;
for ( int a=0;a<6;a++ )
{
if ( a>2 ) x = 75;
if ( a==3 ) y = 2;
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
y += 10;
}
pingSerial();

// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
pingSerial();

// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}

void DrawCustomGraph()
{
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

What kind of access are you refering to?
Roberto.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

Also, what does the lcd screen show for each channel?
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

in the menu, there is no PWM entry at all, and my LEDs are flashing on and off like a neon sign outside a strip club
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

rimai wrote:Also, what does the lcd screen show for each channel?
on the main readout, I have the PWM channels -daylight looks to be @87% and Actinic @90%

when you click on the joystick, there is no option for PWM Channels at all.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

In the main screen, you should have all 6 channels of your PWM expansion module.
You are talking about your expansion module right?
According to your code, Actinic and Daylight channels are assigned to dimmable moonlight and they are supposed to be the same %.
Unless you uploaded another code other than the one you posted.
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

rimai wrote:In the main screen, you should have all 6 channels of your PWM expansion module.
You are talking about your expansion module right?
According to your code, Actinic and Daylight channels are assigned to dimmable moonlight and they are supposed to be the same %.
Unless you uploaded another code other than the one you posted.
when I generated the code via "wizard", PWM Channels 4 and 5 were supposed to be Moon Phase.

I'm so confused.

Ultimately, I would like the RA to do the follwing:
Relay:
1=Heater, On at 75 degrees, Off/Overheat @ 82
2=Skimmer, off for Waterchange
3=Return pump, off for Waterchange
4=On
5=Off
6=Off
7=ATO, using float switches(hi/low)
8=On

Temp Sensors(1=tank, 2=room)
pH Sensor, Read out and graph
Wifi/portal(I'll be purchasing the wifi soon)

PWM Expansion

0,1= Daylight, Parabola(with random cloud cover if possible)
2,3=Actinic, Parabola(random cloud, if possible)
4,5 Moon light, with phases(show moon phase on display if possible)





Is there a pre-built sketch I can download, or is there someone that might be able to build this? I'd gladly pay a few bucks for that as I'm having trouble figuring out how to compile/build a sketch from scratch...
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

The code you had was almost there.
Try this:

Code: Select all

#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.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 = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port3Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 820 );


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port3 );
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

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

void loop()
{
    ReefAngel.StandardHeater( Port1,748,752 );
    ReefAngel.SingleATO( true, Port7, 60, 0 );    
    ReefAngel.PWM.SetChannel( 0, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 1, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,15,100,15) );
    ReefAngel.PWM.SetChannel( 3, PWMParabola(8,0,20,0,15,100,15) );
    ReefAngel.PWM.SetChannel( 4, MoonPhase() );
    ReefAngel.PWM.SetChannel( 5, MoonPhase() );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Dimming Expansion
    x = 15;
    y = 2;
    for ( int a=0;a<6;a++ )
    {
      if ( a>2 ) x = 75;
      if ( a==3 ) y = 2;
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
      y += 10;
    }
    pingSerial();

    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}

Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

rimai wrote:The code you had was almost there.
Try this:

Code: Select all

#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.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 = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port3Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 820 );


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port3 );
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    

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

void loop()
{
    ReefAngel.StandardHeater( Port1,748,752 );
    ReefAngel.SingleATO( true, Port7, 60, 0 );    
    ReefAngel.PWM.SetChannel( 0, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 1, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,15,100,15) );
    ReefAngel.PWM.SetChannel( 3, PWMParabola(8,0,20,0,15,100,15) );
    ReefAngel.PWM.SetChannel( 4, MoonPhase() );
    ReefAngel.PWM.SetChannel( 5, MoonPhase() );
    ////// Place your custom code below here
    

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Dimming Expansion
    x = 15;
    y = 2;
    for ( int a=0;a<6;a++ )
    {
      if ( a>2 ) x = 75;
      if ( a==3 ) y = 2;
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
      ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
      y += 10;
    }
    pingSerial();

    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 84, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}

uploaded, but my LEDs are still flashing on and off.

also, is there a way to put an entry line for maually adjusting the LEDs in the menu? To be able to adjust the Parabola for acclimating new corals(like in the demo software, where you can manually set the power levels on the fly?)
I'd also still like to have a graph, to show fluctuations in pH like in the demo software, and a graphic, if possible, showing the moon phase?

I really appreciate all your help
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

We can do all that stuff when we get the flashing figured out.
I still want to know what you see for each channel on the screen. Do they fluctuate?
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

sorry, had to step out for a sec.

Presently, the Channels read:
0=83
1=83
2=86
3=86
4=43
5=43

I havent hooked up the moonlights yet(also purchased from RA)

*edit. I think I did my wiring wrong, rather than each strip12 LEDs wired in series, I think I wired them in as two strips of 6 in parallel for each channel...before I start hacking away at my wiring, would that be the cause of the flashing?
Last edited by budhaboy on Sat May 12, 2012 1:28 pm, edited 1 time in total.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

Can you go to menu Tools->Reef Angel Libraries and check which version you have installed?
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

rimai wrote:Can you go to menu Tools->Reef Angel Libraries and check which version you have installed?
version 0.9.6 - downloaded it this morning fresh


*edit. I think I did my wiring wrong, rather than each strip12 LEDs wired in series, I think I wired them in as two strips of 6 in parallel for each channel...before I start hacking away at my wiring, would that be the cause of the flashing?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

I remember someone in the forums mentioning this when the LEDs were wired wrong.
I'll see if I can find the post.
Roberto.
billybob
Posts: 21
Joined: Tue Apr 17, 2012 2:47 pm
Location: Colorado

Re: I'm totally lost

Post by billybob »

I had made a comment on flashing LEDs in viewtopic.php?f=15&t=1204 that might be relevant. In short, you may see flashing if the minimum voltage of your driver is greater than the maximum total voltage drop across one of your LED strings.

For example, CREE XM-L's have a maximum voltage drop across each LED of ~3.35 V, so the maximum total voltage drop across a branch of 6 XM-L LEDs is 6*3.35V = 20.1 volts. On the other hand, if you were trying to drive this string with, say, a Meanwell ELN60-48, the driver spec sheet lists he minimum voltage supported as 24V. Trying to drive a 20.1V string of LEDs with a 24V driver could lead to the flashing you're observing.

What kind of LEDs and driver are you using? if you're using the 60-48 from rapidLED (you mentioned that company in the other thread), this could very well be the problem.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

okay, that was it, I had them wired in two strips of 6 LEDS, parallel. No more flashing, or as my wife said, it doesnt look like I'm throwing a Rave in my "war room" anymore.

Cree leds, and Meanwell drivers- it was the 48 LED set from Rapid
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

righty-o! the lights are performing as programmed, buttoned up my wiring...now I'd like to add three things to my sketch, if possible -

1. Graph display for pH levels
2.to be able to manually adjust light intensities for both Actinic and Daylight(for coral acclimation)
3. a graphic indicating the phase of the moon
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

Good.
Do you have the wifi attachment?
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

of course I spoke too soon - the lights power down to 15% and stay at that level, and the moonlights havent kicked on.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

According to your code, that's the way you coded it.
They stay at 15% until next day when it rises again.
Sis you have something else in mind?
The moonlights are supposed to be on all the time on your code too.
Roberto.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: I'm totally lost

Post by rimai »

Ah, I just answered my own question about the wifi when I was reading your previous post.
So, you will need to use the complete menu.
Open RAGen
Move to Features tab
Uncheck Simple Menu
Uncheck wifi
Click Save
That should enable the PWM menu for you.
Then you need to change your code.
Replace this:

Code: Select all

    ReefAngel.PWM.SetChannel( 0, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 1, PWMParabola(8,30,19,30,15,100,15) );
    ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,15,100,15) );
    ReefAngel.PWM.SetChannel( 3, PWMParabola(8,0,20,0,15,100,15) );
With this:

Code: Select all

    ReefAngel.PWM.SetChannel( 0, PWMParabola(8,30,19,30,15,InternalMemory.LEDPWMDaylight_read(),15) );
    ReefAngel.PWM.SetChannel( 1, PWMParabola(8,30,19,30,15,InternalMemory.LEDPWMDaylight_read(),15) );
    ReefAngel.PWM.SetChannel( 2, PWMParabola(8,0,20,0,15,InternalMemory.LEDPWMActinic_read(),15) );
    ReefAngel.PWM.SetChannel( 3, PWMParabola(8,0,20,0,15,InternalMemory.LEDPWMActinic_read(),15) );
Roberto.
budhaboy
Posts: 24
Joined: Mon May 07, 2012 3:05 pm

Re: I'm totally lost

Post by budhaboy »

okay, I did all that...what the heck am I doing wrong...

in the lights sub menu, clicking "lights off" does nothing. Obviously, lights on, since they're already lit, does nothing.
PWM adjustment is working.
PWM ports 4 and 5(moonlight) are listed @ 23%, but they arent lit(not that they're supposed to be yet, I just figured they'd read "0" prior to sunset...


I found this code on JNieuwenhuizen's thread but I have no idea how to insert it into the sketch, nor if I need to use both sectioons...
//Start Moon Phase Display
x += (16*4) + 8;
y += MENU_START_ROW+3;
if (ReefAngel.PWM.GetChannelValue(4) ==0) ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,81,75,"Off");
else if(ReefAngel.PWM.GetChannelValue(4) >=1 && ReefAngel.PWM.GetChannelValue(4) < 5) ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,81,75,"New");
else if(ReefAngel.PWM.GetChannelValue(4) >=5 && ReefAngel.PWM.GetChannelValue(4) < 10) ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,81,75,"Cresent");
else if(ReefAngel.PWM.GetChannelValue(4) >=10 && ReefAngel.PWM.GetChannelValue(4) < 20) ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,81,75,"Half");
else if(ReefAngel.PWM.GetChannelValue(4) >=20 && ReefAngel.PWM.GetChannelValue(4) < 30) ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,81,75,"Gibbous");
else if(ReefAngel.PWM.GetChannelValue(4) >=30 && ReefAngel.PWM.GetChannelValue(4) < 45) ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,81,75,"Full");
//End Display Moon Phase Display
MoonPWMValue=MoonPhase();
if (hour()==22 || hour()==6)
MoonPWMValue=PWMSlope(22,00,6,00,0,MoonPhase(),45,0);
if (ChannelValue[LEDWhiteBlue]==1) MoonPWMValue=0;
ReefAngel.PWM.SetChannel(4,MoonPWMValue);

ChannelValue[LEDWhiteBlue]=PWMSlope(8,0,22,0,0,90,300,ChannelValue[LEDWhiteBlue]);
ChannelValue[LEDWhiteBlue1]=PWMSlope(8,30,21,30,0,90,270,ChannelValue[LEDWhiteBlue1]);
ChannelValue[LEDWhiteBlue2]=PWMSlope(9,0,21,0,0,90,240,ChannelValue[LEDWhiteBlue2]);
ChannelValue[MixedLED]=PWMSlope(12,0,18,0,0,90,60,ChannelValue[MixedLED]);
//ChannelValue[LEDMoonlights]=PWMSlope(22,0,11,59,0,10,0,ChannelValue[LEDMoonlights]);
//ChannelValue[LEDMoonlights]=PWMSlope(00,0,7,0,10,45,240,ChannelValue[LEDMoonlights]);
Deckoz2302's sketch looks promising, but I dont actually need Lightning storms(cloud cover sounds neat tho) nor do I need Vortech codes, RF, WiFi or Salinity codes(Wifi will happen later of course)


of course I'm sure I've gotten far ahead of myself here...
Post Reply