Some strange issues

New members questions
Post Reply
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Some strange issues

Post by Frogman »

Good morning Reef Junkies!

I've always considered myself a geek, but this programming piece has me feeling a little skiddish and insignificant! :lol:

I'm a newbie in the RA work (RA+) and just got my system setup a week ago. I don't have any adapters or modules yet, but I will be looking to get the wireless one in Feb. When I use the wizard to code setup for my lights, I am getting some funky irregularities. I can set on and off times, but it only want to work on occasion.


My questions/issues of concern:

First, the other day the system just completely shut itself off and turned off anything attached to it. It was like it just lost power, display was dead, no power to anything in the unit. Everything I plugged into the outlet worked. I unplugged everything, put it all into a normal power bar and all my equipment was ok. I looked at the module and power box and nothing seemed to be wrong. Next morning I hooked everything back up and it has worked fine.
I unscrewed the unit and there appears to be a small singe type mark on the primary board attached to the joystick. When I plugged it back in, the display was asci characters until I re-ran the wizard and the display seemed to correct itself. I took a fine bristle brush (dry) and gently cleaned it off. So far so good. Ill keep an eye on this and send it back if it continues.

Secondly, my lighting. I am in the process of changing to LED's, but I currently have a Aqualife pro 72 MH(3x150)T5 combo. My lighting works well except for moon light (4 led's built into the system (Plug 1) and a modular LED light bar plugged into port 2. (actinics are on 2 and MH/T5 are on 4) When I put in the code for

Its not exactly right, I'm trying to do this from memory while on break at work
(Moon Lights)

StandardLights ... port1 (,5,00,9,00) ;(19,00,22,00) ;
StandardLights ... port2 (,5,45,9,00) ;(19,00,22,45) ;
etc...

The lights will turn on and off at the correct times, until Saturday, when they didn't want to come on any more in the evening. I reloaded the base program, ran the wizard and then edited the code again, it wouldn't work. (Note, this is after the unit mysteriously shut itself off.)

Do you think there is a problem with the controller?
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Some strange issues

Post by cosmith71 »

Post your code.

Does the screen show the appropriate outlets have switched on? How many total amps does that MH/T5 fixture draw?

--Colin
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

Collin,

Sorry for the delay in my reply, I was helping host a Frag Swap so needless to say, its been a busy weekend.

I had ZERO power, no outlets, no RA power... Nothing.

The problem was a faulty cord. I took another cord from my computer hardware supplies and the problem disappeared..

Ill post my code later tonight when I get home.

Jeremiah

cosmith71 wrote:Post your code.

Does the screen show the appropriate outlets have switched on? How many total amps does that MH/T5 fixture draw?

--Colin
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

My Code:


#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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{
ReefAngel.StandardLights( Port1,5,0,10,0 );
ReefAngel.StandardLights( Port1,19,00,22,45 ) ;
ReefAngel.StandardLights( Port2,5,45,10,0 );
ReefAngel.StandardLights( Port2,19,00,22,00 ) ;
ReefAngel.StandardLights( Port3,9,55,20,30 );
ReefAngel.StandardLights( Port4,12,0,20,0 );
ReefAngel.StandardHeater( Port7,760,780 );

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Some strange issues

Post by cosmith71 »

Hmmm. I'm not sure you can do two StandardLights for the same port.

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 <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{
  
if ((hour() >= 5 && hour() < 10) || (hour() >=17 && (hour() < 22 && minute() < 45)))
{
  ReefAngel.Relay.On(Port1);
}
else
{
  ReefAngel.Relay.Off(Port1);
}

if (((hour() >= 5 && minute() >= 45) && hour() < 10) || (hour() >= 19 && hour() < 22))
{
  ReefAngel.Relay.On(Port2);
}
else
{
  ReefAngel.Relay.Off(Port2);
}


ReefAngel.StandardLights( Port3,9,55,20,30 );
ReefAngel.StandardLights( Port4,12,0,20,0 );
ReefAngel.StandardHeater( Port7,760,780 );

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
}
Last edited by cosmith71 on Thu Jan 28, 2016 5:08 pm, edited 1 time in total.
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

Thanks, I will try this when I get home.
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

I am getting this error when I post the code. Its changed slightly, did I miss something?

The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
2014 Main Screen
Extra Font - Medium Size (8x8 pixels)
Standard Menu
sketch_jan27a.cpp: In function 'void loop()':
sketch_jan27a:76: error: expected `)' before '{' token
sketch_jan27a:79: error: expected `)' before 'else'

--
Code:


#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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{

if ((hour() >= 5 && hour() < 10) || (hour() >=17 && (hour() < 22 && minute() < 45)
{
ReefAngel.Relay.On(Port2);
}
else
{
ReefAngel.Relay.Off(Port2);
}

if (((hour() >= 5 && minute() >= 45) && hour() < 10) || (hour >= 19 && hour() < 22))
({
ReefAngel.Relay.On(Port3);
})
else
({
ReefAngel.Relay.Off(Port3);
})

ReefAngel.StandardATO( Port1,60 );
ReefAngel.StandardHeater( Port7,780,800 );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
}
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Some strange issues

Post by cosmith71 »

Yeah, this part. You have extra parentheses. Just click "Select All" on the code I posted, copy, then paste into Arduino.

Code: Select all

if (((hour() >= 5 && minute() >= 45) && hour() < 10) || (hour >= 19 && hour() < 22))
({
ReefAngel.Relay.On(Port3);
})
else
({
ReefAngel.Relay.Off(Port3);
})
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

Same Error

#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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{

if ((hour() >= 5 && hour() < 10) || (hour() >=17 && (hour() < 22 && minute() < 45)
***Here is where it states the error is***

{
ReefAngel.Relay.On(Port1);
}
else
{
ReefAngel.Relay.Off(Port1);
}

if (((hour() >= 5 && minute() >= 45) && hour() < 10) || (hour >= 19 && hour() < 22))
{
ReefAngel.Relay.On(Port2);
}
else
{
ReefAngel.Relay.Off(Port2);
}


ReefAngel.StandardLights( Port3,9,55,20,30 );
ReefAngel.StandardLights( Port4,12,0,20,0 );
ReefAngel.StandardHeater( Port7,760,780 );

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
Attachments
See screen Capture
See screen Capture
Error.jpg (148.29 KiB) Viewed 8487 times
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

Sorry, Like I said i am new.. Please bear with me.
I didn't realize I wasn't copying the editor
#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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{
if (((hour() >= 5 && hour() < 10) || (hour() >=17 && (hour() < 22 && minute() < 45))
{
  ReefAngel.Relay.On(Port1);
}
else
{
  ReefAngel.Relay.Off(Port1);
}

if (((hour() >= 5 && minute() >= 45) && hour() < 10) || (hour >= 19 && hour() < 22))
{
  ReefAngel.Relay.On(Port2);
}
else
{
  ReefAngel.Relay.Off(Port2);
}

ReefAngel.StandardLights( Port3,9,55,20,30 );
ReefAngel.StandardLights( Port4,12,0,20,0 );
ReefAngel.StandardHeater( Port7,760,780 );

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Some strange issues

Post by cosmith71 »

Stupid parentheses. :oops:

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 <Humidity.h>
#include <DCPump.h>
#include <PAR.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.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{
  
if ((hour() >= 5 && hour() < 10) || (hour() >=17 && (hour() < 22 && minute() < 45)))
{
  ReefAngel.Relay.On(Port1);
}
else
{
  ReefAngel.Relay.Off(Port1);
}

if (((hour() >= 5 && minute() >= 45) && hour() < 10) || (hour() >= 19 && hour() < 22))
{
  ReefAngel.Relay.On(Port2);
}
else
{
  ReefAngel.Relay.Off(Port2);
}


ReefAngel.StandardLights( Port3,9,55,20,30 );
ReefAngel.StandardLights( Port4,12,0,20,0 );
ReefAngel.StandardHeater( Port7,760,780 );

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
}
Frogman
Posts: 19
Joined: Fri Jan 15, 2016 1:04 pm
Contact:

Re: Some strange issues

Post by Frogman »

I was trying, resolved the first one, but couldn't figure out the second set.
My Wifi Controller should come tomorrow, so i might change up a little, but what you've helped me with is beginning to make sense. Hopefully I can do a little coding (sheer attempt at this point) this weekend and see what I can come up with.

Thanks again! Sincerely Appreciated!!!
Post Reply