Main Menu features

Do you have a question on how to do something.
Ask in here.
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

rimai, binder THANK YOU FOR THE GREAT HELP
all uploads working, testing now for the functionality
including the code for future reference

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 <PH.h>
#include <WaterLevel.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
  ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

  ReefAngel.AddStandardMenu();  // Add Standard Menu

    // Ports toggled in Feeding Mode
  ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit | Port8Bit;
  // Ports toggled in Water Change Mode
  ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit 
| Port8Bit;
  // Ports toggled when Lights On / Off menu entry selected
  ReefAngel.LightsOnPorts = Port3Bit | Port4Bit | Port5Bit | Port6Bit 
| Port7Bit | Port8Bit;
  // Ports turned off when Overheat temperature exceeded
  ReefAngel.OverheatShutoffPorts = 0;
  // Use T1 probe as temperature and overheat functions
  ReefAngel.TempProbe = T1_PROBE;
  ReefAngel.OverheatProbe = T1_PROBE;
  // Set the Overheat temperature setting
  InternalMemory.OverheatTemp_write( 280 );

  // Ports that are always on
  //ReefAngel.Relay.On( Port7 );
  ReefAngel.Relay.On( Port8 );
   
   // Set the Lights Overheat probe to be T1
  ReefAngel.OverheatProbe = T1_PROBE;  // Default:  T2_PROBE
  // Set the Water Temp probe to be T2, this is used for the StandardHeater and StandardFan functions
  ReefAngel.TempProbe = T2_PROBE;  // Default:  T1_PROBE
  
  ////// Place additional initialization code below here

  ReefAngel.Timer[1].SetInterval(45);

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

void loop()
{
//  ReefAngel.StandardATO( Port1,55 );
  ReefAngel.StandardHeater( Port2,240,255 );
  ReefAngel.StandardLights( Port3,11,5,20,5 );
  ReefAngel.StandardLights( Port4,8,5,15,55 );
  //The following is the timer for Polario
  ReefAngel.StandardLights( Port7,9,5,19,5 );
  if (hour()>=10 && hour()<18)
  {
    ReefAngel.Wavemaker( Port5,25 );
    ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
  }
  else
  {
    ReefAngel.Relay.Off(Port5);
    ReefAngel.Relay.Off(Port6);
  }
  ReefAngel.PWM.SetChannel( 0, PWMParabola(9,5,19,5,0,100,0) );
  ReefAngel.PWM.SetChannel( 1, PWMParabola(10,5,18,5,0,100,0) );
  ReefAngel.PWM.SetChannel( 2, PWMParabola(11,5,15,35,0,100,0) );
  ReefAngel.PWM.SetChannel( 3, PWMParabola(14,5,17,25,0,100,0) );
  ReefAngel.PWM.SetChannel( 4, PWMParabola(18,35,24,5,40,100,40) );
  //ReefAngel.PWM.SetChannel( 5, PWMParabola(9,3,20,15,50,100,50) );
  ////// Place your custom code below here

  //Float #1

  if (ReefAngel.IO.GetChannel(1)) // if float 1 is triggered
  {
  // ReefAngel.Relay.Off(Port8); // Turn Polario off
    ReefAngel.Relay.Off(Port7); // Turn Return off
  // BuzzerOn(); // Turn Buzzer on
  }

  //Float #2
  if (ReefAngel.IO.GetChannel(2)) // if float 2 is triggered
  {
    ReefAngel.Relay.On(Port1); // Turn AutoTopOff on
    ReefAngel.Timer[1].Start(); // Start/Trigger timer
  }

  // Float #3
  // if (ReefAngel.IO.GetChannel(3)) // if float 3 is triggered
  // BuzzerOn(); // Turn Buzzer on

  // Float #4
  // if (ReefAngel.IO.GetChannel(4)) // if float 4 is triggered
  // ReefAngel.Relay.On(Port7); // Turn Skimmer off

  // Float #5
  // if (ReefAngel.IO.GetChannel(5)) // if float 5 is triggered
  // ReefAngel.Relay.Off(Port8); // Turn Return off  
  //  BuzzerOn(); // Turn Buzzer on
  
  // Timer 1
  if (ReefAngel.Timer[1].IsTriggered())
    ReefAngel.Relay.Off(Port1); // Turn AutoTopOff off


  ////// 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 = 14;
  y = 6;
  for ( int a=0;a<6;a++ )
  {
    if ( a>2 ) x = 75;
    if ( a==3 ) y = 6;
    ReefAngel.LCD.DrawText( COLOR_NAVY,DefaultBGColor,x,y,"Ch :" );
    ReefAngel.LCD.DrawText( COLOR_NAVY,DefaultBGColor,x+12,y,a );
    ReefAngel.LCD.DrawText( COLOR_NAVY,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
    y += 10;
  }
  pingSerial();

  // I/O Expansion
  byte bkcolor;
  x = 27;
  y = 47;
  for ( int a=0;a<4;a++ )
  {
    ReefAngel.LCD.DrawCircleOutline( x+(a*25),y,4,COLOR_NAVY );
    if ( ReefAngel.IO.GetChannel(a) ) bkcolor=COLOR_WHITE; 
    else bkcolor=COLOR_RED;
    ReefAngel.LCD.FillCircle( x+(a*25),y,2,bkcolor );
  }
  pingSerial();

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

// Parameters
  // Set the starting coordinates for displaying the parameters
  x =14;
  y = 60;
  // Change these values as needed. They are the threshold values
  // for the low and high temperatures, respectively. The values do
  // not contain decimal points. 
  int lowTempValue = 240;
  int highTempValue = 255;
  byte TempColor;
  // To make changes for each temp sensor, change the value
  // of TempColor to be the appropriate color
  // T1 Temperature
  if ( ReefAngel.Params.Temp[T1_PROBE] < lowTempValue ) { TempColor = COLOR_BLUE; }
  else if ( ReefAngel.Params.Temp[T1_PROBE] > highTempValue ) { TempColor = COLOR_RED; }
  else { TempColor = PHColor; }
  ReefAngel.LCD.DrawText(TempColor,COLOR_WHITE,x,y,"LEDs:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T1_PROBE], TempColor, x+30, y,10); 
  // T2 Temperature
  if ( ReefAngel.Params.Temp[T2_PROBE] < lowTempValue ) { TempColor = COLOR_BLUE; }
  else if ( ReefAngel.Params.Temp[T2_PROBE] > highTempValue ) { TempColor = COLOR_RED; }
  else { TempColor = PHColor; }
  ReefAngel.LCD.DrawText(TempColor,COLOR_WHITE,x,y+10,"Tank:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T2_PROBE], TempColor, x+30, y+10,10); 
  // T3 Temperature
  if ( ReefAngel.Params.Temp[T3_PROBE] < lowTempValue ) { TempColor = COLOR_BLUE; }
  else if ( ReefAngel.Params.Temp[T3_PROBE] > highTempValue ) { TempColor = COLOR_RED; }
  else { TempColor = PHColor; }
  ReefAngel.LCD.DrawText(TempColor,COLOR_WHITE,x,y+20,"Room:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T3_PROBE], TempColor, x+30, y+20,10); 
  ReefAngel.LCD.DrawText(PHColor,COLOR_WHITE,x+60,y,"PH:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.PH, PHColor, x+80, y,100); 
// Keep these commented out to remove the DP & AP lines
//  DrawText(DPColor,COLOR_WHITE,x+60,y+10,"DP:");
//  DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(), DPColor, x+78, y+10,1); 
//  DrawText(APColor,COLOR_WHITE,x+60,y+20,"AP:");
//  DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(), APColor, x+78, y+20,1); 
  pingSerial();

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

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

void DrawCustomGraph()
{
}

void BuzzerOn()
{
  ReefAngel.PWM.SetActinic((now()%2)*100);
}

My next step is to find the way dimming to dark when the values showing zero
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Main Menu features

Post by binder »

awesome! glad you got it figured out!

Sent from my Moto X
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

I am noticing, in relative to the time of the day the display shows either 0 or 100% and nothing in between...
at this moment I am testing the parabola, one day, the other day the slope
(btw the LED's are ramping up in the morning, it is visible how the light increases whenever I am passing by, but at evening there is no ramping down, feels like full power until the timer shots the 5-6 relay ports down)
do we have a known issue?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Main Menu features

Post by rimai »

Maybe you got the wrong times?
Can you post the updated code?
Which channels are your LEDs connected to?
Roberto.
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

this last code just couple posts above
#4-5 relays powering the 2+2 dimmers, and these are the four channels from 0-3 feeding the LEDs
(4 is a moonlight and the 5 would be the a cooling fan but the dimming module can't give enough Amps)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Main Menu features

Post by rimai »

Your relay #4 is on from about 8:05am to 3:55pm
Relay #5 is setup as wavemaker for Koralias or something.
But your channels are setup to go all over the place.
Channel 0 is from 9:05am to 7:05pm
Channel 1 is from 10:05am to 6:05pm
Channel 2 is from 11:05am to 3:35pm
Channel 3 is from 2:05pm to 5:25pm
Your code is really confusing.
Roberto.
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

sorry not #5
3 and 4 have one of each power cables running to 2+2 ELM's,
{I did rewiring the ELM 60-40 drivers for a manual overdrive for case of emergency and when I finished then I noticed the #3 and #4 powercable swap inside the box, didn't wanted to re-solder again so I just moved the timing....}
I had to go downstairs to my old laptop monitoring the parameters for my testing....here is a current code from the RA+

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 <PH.h>
#include <WaterLevel.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
  ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

  ReefAngel.AddStandardMenu();  // Add Standard Menu

    // Ports toggled in Feeding Mode
  ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit | Port8Bit;
  // Ports toggled in Water Change Mode
  ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit 
| Port8Bit;
  // Ports toggled when Lights On / Off menu entry selected
  ReefAngel.LightsOnPorts = Port3Bit | Port4Bit | Port5Bit | Port6Bit 
| Port7Bit | Port8Bit;
  // Ports turned off when Overheat temperature exceeded
  ReefAngel.OverheatShutoffPorts = 0;
  // Use T1 probe as temperature and overheat functions
  ReefAngel.TempProbe = T1_PROBE;
  ReefAngel.OverheatProbe = T1_PROBE;
  // Set the Overheat temperature setting
  InternalMemory.OverheatTemp_write( 280 );

  // Ports that are always on
  //ReefAngel.Relay.On( Port7 );
  ReefAngel.Relay.On( Port8 );
   
   // Set the Lights Overheat probe to be T1
  ReefAngel.OverheatProbe = T1_PROBE;  // Default:  T2_PROBE
  // Set the Water Temp probe to be T2, this is used for the StandardHeater and StandardFan functions
  ReefAngel.TempProbe = T2_PROBE;  // Default:  T1_PROBE
  
  ////// Place additional initialization code below here

  ReefAngel.Timer[1].SetInterval(45);

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

void loop()
{
//  ReefAngel.StandardATO( Port1,55 );
  ReefAngel.StandardHeater( Port2,240,255 );
  ReefAngel.StandardLights( Port3,11,5,20,5 );
  ReefAngel.StandardLights( Port4,8,5,15,55 );
  //The following is the timer for Polario
  ReefAngel.StandardLights( Port7,9,5,19,5 );
  if (hour()>=10 && hour()<18)
  {
    ReefAngel.Wavemaker( Port5,25 );
    ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
  }
  else
  {
    ReefAngel.Relay.Off(Port5);
    ReefAngel.Relay.Off(Port6);
  }
  //ReefAngel.PWM.SetChannel( 0, PWMParabola(9,5,14,5,0,100,0) );
  //ReefAngel.PWM.SetChannel( 1, PWMParabola(10,5,15,35,0,100,0) );
  //ReefAngel.PWM.SetChannel( 2, PWMParabola(12,5,17,5,0,100,0) );
  //ReefAngel.PWM.SetChannel( 3, PWMParabola(14,5,19,25,0,100,0) );
  //ReefAngel.PWM.SetChannel( 4, PWMParabola(18,35,23,55,0,100,0) );
  //ReefAngel.PWM.SetChannel( 5, PWMParabola(9,3,20,15,50,100,50) );
  
    ReefAngel.PWM.SetChannel( 0, PWMSlope(9,5,14,5,0,100,20,0) );
    ReefAngel.PWM.SetChannel( 1, PWMSlope(10,5,13,35,0,100,20,0) );
    ReefAngel.PWM.SetChannel( 2, PWMSlope(12,5,17,5,0,100,20,0) );
    ReefAngel.PWM.SetChannel( 3, PWMSlope(14,5,19,25,0,100,20,0) );
    ReefAngel.PWM.SetChannel( 4, PWMSlope(18,35,23,55,0,100,30,0) );
  
  ////// Place your custom code below here

  //Float #1

  if (ReefAngel.IO.GetChannel(1)) // if float 1 is triggered
  {
  // ReefAngel.Relay.Off(Port8); // Turn Polario off
    ReefAngel.Relay.Off(Port7); // Turn Return off
  // BuzzerOn(); // Turn Buzzer on
  }

  //Float #2
  if (ReefAngel.IO.GetChannel(2)) // if float 2 is triggered
  {
    ReefAngel.Relay.On(Port1); // Turn AutoTopOff on
    ReefAngel.Timer[1].Start(); // Start/Trigger timer
  }

  // Float #3
  // if (ReefAngel.IO.GetChannel(3)) // if float 3 is triggered
  // BuzzerOn(); // Turn Buzzer on

  // Float #4
  // if (ReefAngel.IO.GetChannel(4)) // if float 4 is triggered
  // ReefAngel.Relay.On(Port7); // Turn Skimmer off

  // Float #5
  // if (ReefAngel.IO.GetChannel(5)) // if float 5 is triggered
  // ReefAngel.Relay.Off(Port8); // Turn Return off  
  //  BuzzerOn(); // Turn Buzzer on
  
  // Timer 1
  if (ReefAngel.Timer[1].IsTriggered())
    ReefAngel.Relay.Off(Port1); // Turn AutoTopOff off


  ////// 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 = 14;
  y = 6;
  for ( int a=0;a<6;a++ )
  {
    if ( a>2 ) x = 75;
    if ( a==3 ) y = 6;
    ReefAngel.LCD.DrawText( COLOR_NAVY,DefaultBGColor,x,y,"Ch :" );
    ReefAngel.LCD.DrawText( COLOR_NAVY,DefaultBGColor,x+12,y,a );
    ReefAngel.LCD.DrawText( COLOR_NAVY,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
    y += 10;
  }
  pingSerial();

  // I/O Expansion
  byte bkcolor;
  x = 27;
  y = 47;
  for ( int a=0;a<4;a++ )
  {
    ReefAngel.LCD.DrawCircleOutline( x+(a*25),y,4,COLOR_NAVY );
    if ( ReefAngel.IO.GetChannel(a) ) bkcolor=COLOR_WHITE; 
    else bkcolor=COLOR_RED;
    ReefAngel.LCD.FillCircle( x+(a*25),y,2,bkcolor );
  }
  pingSerial();

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

// Parameters
  // Set the starting coordinates for displaying the parameters
  x =14;
  y = 60;
  // Change these values as needed. They are the threshold values
  // for the low and high temperatures, respectively. The values do
  // not contain decimal points. 
  int lowTempValue = 240;
  int highTempValue = 255;
  byte TempColor;
  // To make changes for each temp sensor, change the value
  // of TempColor to be the appropriate color
  // T1 Temperature
  if ( ReefAngel.Params.Temp[T1_PROBE] < lowTempValue ) { TempColor = COLOR_BLUE; }
  else if ( ReefAngel.Params.Temp[T1_PROBE] > highTempValue ) { TempColor = COLOR_RED; }
  else { TempColor = PHColor; }
  ReefAngel.LCD.DrawText(TempColor,COLOR_WHITE,x,y,"LEDs:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T1_PROBE], TempColor, x+30, y,10); 
  // T2 Temperature
  if ( ReefAngel.Params.Temp[T2_PROBE] < lowTempValue ) { TempColor = COLOR_BLUE; }
  else if ( ReefAngel.Params.Temp[T2_PROBE] > highTempValue ) { TempColor = COLOR_RED; }
  else { TempColor = PHColor; }
  ReefAngel.LCD.DrawText(TempColor,COLOR_WHITE,x,y+10,"Tank:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T2_PROBE], TempColor, x+30, y+10,10); 
  // T3 Temperature
  if ( ReefAngel.Params.Temp[T3_PROBE] < lowTempValue ) { TempColor = COLOR_BLUE; }
  else if ( ReefAngel.Params.Temp[T3_PROBE] > highTempValue ) { TempColor = COLOR_RED; }
  else { TempColor = PHColor; }
  ReefAngel.LCD.DrawText(TempColor,COLOR_WHITE,x,y+20,"Room:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T3_PROBE], TempColor, x+30, y+20,10); 
  ReefAngel.LCD.DrawText(PHColor,COLOR_WHITE,x+60,y,"PH:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.PH, PHColor, x+80, y,100); 
// Keep these commented out to remove the DP & AP lines
//  DrawText(DPColor,COLOR_WHITE,x+60,y+10,"DP:");
//  DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(), DPColor, x+78, y+10,1); 
//  DrawText(APColor,COLOR_WHITE,x+60,y+20,"AP:");
//  DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(), APColor, x+78, y+20,1); 
  pingSerial();

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

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

void DrawCustomGraph()
{
}

void BuzzerOn()
{
  ReefAngel.PWM.SetActinic((now()%2)*100);
}

The #4 relay is powering the 2 ELM's with Channels 0 and 1 (one ELM each)
The #3 relay is powering the 2 ELM's with Channels 2 and 3 (one ELM each)
The #4 is a moonlight
#5 is off becuase the expansion module can't support enough Amps to the fans.

ReefAngel.StandardLights( Port3,11,5,20,5 );
ReefAngel.StandardLights( Port4,8,5,15,55 );

//ReefAngel.PWM.SetChannel( 0, PWMParabola(9,5,14,5,0,100,0) );
//ReefAngel.PWM.SetChannel( 1, PWMParabola(10,5,15,35,0,100,0) );
//ReefAngel.PWM.SetChannel( 2, PWMParabola(12,5,17,5,0,100,0) );
//ReefAngel.PWM.SetChannel( 3, PWMParabola(14,5,19,25,0,100,0) );
//ReefAngel.PWM.SetChannel( 4, PWMParabola(18,35,23,55,0,100,0) );
//ReefAngel.PWM.SetChannel( 5, PWMParabola(9,3,20,15,50,100,50) );

ReefAngel.PWM.SetChannel( 0, PWMSlope(9,5,14,5,0,100,20,0) );
ReefAngel.PWM.SetChannel( 1, PWMSlope(10,5,13,35,0,100,20,0) );
ReefAngel.PWM.SetChannel( 2, PWMSlope(12,5,17,5,0,100,20,0) );
ReefAngel.PWM.SetChannel( 3, PWMSlope(14,5,19,25,0,100,20,0) );
ReefAngel.PWM.SetChannel( 4, PWMSlope(18,35,23,55,0,100,30,0) );

8.05 AM relay #4 turns ON, 9.05 Channel 0 comes ON
10.05 Channel 1
11.05 relay #3
and so on
At evening the Channels 2 and 3 are ...looks like full light before turns OFF at 20.05 PM

Right now I am sitting in front of the tank, the RA+ LCD shows me
Channel 0=0; measuring 7.7 Volts on the dimming module port
ch1=0; 7.29V
ch2=0; 7.74V
ch3=100; 5.49V
ch4=0; 8.0V
ch5=0; 7.9V
but the LED channels 2 and 3 are ON both, can't say full light but almost
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

18 minutes after midnight, a quick look at the RA+

ch0=0 10.64 Volt on the expansion module port
ch1=0 10.64 V
ch2=0 10.64 V
ch3=00 5.78 V
ch4=000 8.6 V

Is this normal? Also, finding it interesting the number of zeros........
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Main Menu features

Post by lnevo »

Are you sure the time is set properly on your RA?
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

How you mean "time is set properly"?
AM and PM is right, the RA clock is in sync to PC, what else is there?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Main Menu features

Post by lnevo »

That's pretty much it... just not sure why you should have full voltage on the dimming channels at midnight...
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

does the number of digits for zero's have anything to do with it?
{0 -or- 00 -or- 000}
right now is 3.40 pm in my PC and the RA+ is late 3 minutes (last time they were synced 3 days ago), today I am running the slope from the same program above

ch0 = 00
ch1 = 000
ch2 = 800
ch3 = 77
ch4 = 0
ch5 = 980
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Main Menu features

Post by rimai »

The 0s are the remaining of the 100 that was previously drawn in the screen.
Your custom screen is not clearing the zeros. If you click the joystick to enter menu and exit it out, it will force a full refresh in the screen, which clears the zeros.
Roberto.
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

any work around possible with 0 Volts to ram up to 10V and back to 0 Volts on the dimming module?
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

So I can assume the dimming expansion module is "as is" ?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Main Menu features

Post by lnevo »

There should be no issue going 0V-10V-0V. Try loading the controller test code.
bigHUN
Posts: 97
Joined: Sat Dec 03, 2011 9:41 pm

Re: Main Menu features

Post by bigHUN »

"controller test code"

Where can I find it, what and how to do it to post back?
Post Reply