Page 1 of 1

Buzzer not working.

Posted: Sat May 03, 2014 11:20 am
by Trevenator
In the wizard when I get to the daylight dimming channel I select buzzer because that's what I have it plugged in.

Then at the end of the wizard where it says buzzer - please check when the buzzer will come on I check overheat and ATO timeout.

It has never worked when the ATO times out or it overheats.

The buzzer works because every time I unplug the unit the buzzer rings for a few seconds till the head unit boots up.

Re: Buzzer not working.

Posted: Sat May 03, 2014 11:44 am
by rimai
Can I see the code?

Re: Buzzer not working.

Posted: Mon May 05, 2014 11:42 am
by Trevenator
#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 <ReefAngel.h>

// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=0;
byte atoflag=0;

////// 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.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port7Bit | Port8Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;

// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;


// Ports that are always on

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


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

void loop()
{
ReefAngel.SingleATOLow( Port1 );
ReefAngel.StandardHeater( Port2 );
ReefAngel.StandardFan( Port3 );
ReefAngel.DosingPumpRepeat1( Port4 );
ReefAngel.DosingPumpRepeat2( Port5 );
ReefAngel.DosingPumpRepeat3( Port6 );
ReefAngel.DayLights( Port7 );
ReefAngel.ActinicLights( Port8 );
ReefAngel.PWM.SetActinic( MoonPhase() );
ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = None;
ReefAngel.DCPump.ExpansionChannel[0] = Sync;
ReefAngel.DCPump.ExpansionChannel[1] = AntiSync;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
atoflag = InternalMemory.read( ATO_Exceed_Flag );
buzzer = overheatflag + atoflag;
if ( buzzer >= 1 ) buzzer = 100;
ReefAngel.PWM.SetDaylight( buzzer );

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


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

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

Re: Buzzer not working.

Posted: Mon May 05, 2014 11:49 am
by rimai
Code looks good.
When you have ATO timeout or overheat, does the red status led turn on and what do you see on the screen for the daylight channel value?

Re: Buzzer not working.

Posted: Mon May 05, 2014 1:29 pm
by Trevenator
Yes red light turns on and ATO pump stops and then you have to go into the menu and reset the ATO timeout.
And in the portal the ATO high turns red.

Re: Buzzer not working.

Posted: Mon May 05, 2014 1:37 pm
by rimai
But you use ATO Low...
ReefAngel.SingleATOLow( Port1 );
What's ATO High?

Re: Buzzer not working.

Posted: Mon May 05, 2014 1:51 pm
by Trevenator
rimai wrote:But you use ATO Low...
ReefAngel.SingleATOLow( Port1 );
What's ATO High?
No sorry I got that wrong they are both red and the ATO low turns green when the pump is on.

Re: Buzzer not working.

Posted: Mon May 05, 2014 2:19 pm
by rimai
There is something wrong.
ATO High should not change state if you are not using. Do you also have a float switch on ATO high port?
Are you sure you have the float switch in the correct ATO port?
Your code is using ATO Low. You should connect the float on ATO Low port.

Re: Buzzer not working.

Posted: Mon May 05, 2014 8:47 pm
by Trevenator
Yes I looked at the portal wrong. Its only the ato low that changes green when the pump is on.
The ato high never changes.
Its plugged in to the ato low.
It works fine as far as shutting off the pump etc when it times out.
It just will not sound the buzzer.

Re: Buzzer not working.

Posted: Mon May 05, 2014 9:16 pm
by rimai
Ok, when it is supposed to sound the buzzer, what do you see in the screen on the daylight channel?

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:03 pm
by Trevenator
rimai wrote:Ok, when it is supposed to sound the buzzer, what do you see in the screen on the daylight channel?
On the portal it shows buzzer 0%

On my reef angel screen there is nothing to show the daylight or antic

I just have at the top of the screen its shows channel 0-5
channel 0 is my jebo wp40 so it shows like 780
channel 1 is my jebo wp40 so it shows like 810
channel 2 is unused so 0
channel 3 is unused so 0
channel 4 is unused so 0
channel 5 is unused so 0

then temp 1-3 on the left below that

then ph and dp and ap to the right of the 3 temps

below that I have the water level and salinity

on the bottom is the 8 blocks for what plug has power.

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:12 pm
by rimai
dp is the daylight channel. What does it show for dp when ATO is timed out?

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:30 pm
by Trevenator
rimai wrote:dp is the daylight channel. What does it show for dp when ATO is timed out?
it shows 0

and I just reloaded the code after I downloaded the new library.
so now it shows dimming on the led screen

So after I let the ato timeout and the red light comes on the controller and it shuts the ato pump off
its shows
dimming
daylight 0
actinic 46

the actinic 46 is my moonlight hub

if I plug the buzzer in to the actinic it rings so I know its not a hardware problem

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:38 pm
by Trevenator
Here is the code again
Its just from the wizard. No changes from me

#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 <ReefAngel.h>

// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=0;
byte atoflag=0;

////// 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.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port4Bit | Port5Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port7Bit | Port8Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;

// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;


// Ports that are always on

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


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

void loop()
{
ReefAngel.SingleATOLow( Port1 );
ReefAngel.StandardHeater( Port2 );
ReefAngel.StandardFan( Port3 );
ReefAngel.DosingPumpRepeat1( Port4 );
ReefAngel.DosingPumpRepeat2( Port5 );
ReefAngel.DosingPumpRepeat3( Port6 );
ReefAngel.DayLights( Port7 );
ReefAngel.ActinicLights( Port8 );
ReefAngel.PWM.SetActinic( MoonPhase() );
ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = None;
ReefAngel.DCPump.ExpansionChannel[0] = Sync;
ReefAngel.DCPump.ExpansionChannel[1] = AntiSync;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
atoflag = InternalMemory.read( ATO_Exceed_Flag );
buzzer = overheatflag + atoflag;
if ( buzzer >= 1 ) buzzer = 100;
ReefAngel.PWM.SetDaylight( buzzer );

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


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

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

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:42 pm
by rimai
Not sure what is going on...
Let's change your code...
Replace this:

Code: Select all

buzzer = overheatflag + atoflag;
With this:

Code: Select all

buzzer=ReefAngel.AlerFlags;

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:50 pm
by Trevenator
when I do that it says

sketch_may06a:96: error: 'class ReefAngelClass' has no member named 'AlerFlags'

when I try to upload

Re: Buzzer not working.

Posted: Tue May 06, 2014 2:58 pm
by Trevenator
Ahh never mind I see we are missing a t in

buzzer=ReefAngel.AlerFlags;

buzzer=ReefAngel.AlertFlags;

Re: Buzzer not working.

Posted: Tue May 06, 2014 3:07 pm
by Trevenator
Great that works.
Buzzer sounds when ato times out.

Re: Buzzer not working.

Posted: Tue May 06, 2014 3:13 pm
by Trevenator
That also fixed it not sending a email when It times out like a had posted over at
http://forum.reefangel.com/viewtopic.php?f=20&t=4572

So it killed 2 birds with one stone.
:)