PH Expansion Not Showing

Expansion modules and attachments
Post Reply
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

PH Expansion Not Showing

Post by Lockes »

Can anyone please assist?

The PH Expansion is not showing up at all

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

////// Place global variable code below here


////// Place global variable code above here

void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 64);
ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 19, 4 , "BOBS REEF");
ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
ReefAngel.LCD.Clear(COLOR_MAROON, 10, 75, 119, 75);
ReefAngel.LCD.Clear(COLOR_MAROON, 10, 59, 119, 59);
pingSerial();


ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 33, 15, "Tank Water");
char text[7];
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
pingSerial();
ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, DefaultBGColor, 15, 26, text);
ConvertNumToString(text, ReefAngel.Params.Temp[T2_PROBE], 10);
pingSerial();
ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, DefaultBGColor, 60, 26, text);

ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 15, 35, "pH");
ConvertNumToString(text, ReefAngel.Params.PH, 100);

ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 15, 42, text);
pingSerial();

ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 60, 35, "pH2");
ConvertNumToString(text, ReefAngel.Params.PHExp, 100);

ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 60, 42, text);
pingSerial();

ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,84,"ATO");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,94,"N/A");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,104,"CO2");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,114,"N/A");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,84,"Return");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,94,"Vortech");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,104,"N/A");
ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,114,"Heater");
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawCircleOutletBox(60, 86, TempRelay, true);
}

void DrawCustomGraph()
{

}

void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // 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( 260 );


    // Ports that are always on
    ReefAngel.Relay.On( Port1 );

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

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

void loop()
{
    ReefAngel.SingleATO( true,Port2,60,0 );
    ReefAngel.StandardLights( Port3,4,0,23,0 );
    ReefAngel.StandardHeater( Port7,250,255 );
    ////// Place your custom code below here
    if (ReefAngel.Params.PHExp <= 735) ReefAngel.Relay.Off(Port6);  // If probe 2 PH <= 7.35 - turn off CO2
    if (ReefAngel.Params.PHExp >= 752) ReefAngel.Relay.On(Port6);  // If probe 2 PH >= 7.52 - turn on CO2    if (ReefAngel.Params.PH <= 790) Relay.Off(Port6);  // If PH <= LowPH - turn off CO2
    if (ReefAngel.Params.PH <= 790) ReefAngel.Relay.Off(Port6);  // If probe 1 PH <= 7.90 - turn off CO2
   

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

    // This should always be the last line
    ReefAngel.Portal( "Lockes" );
    ReefAngel.ShowInterface();
}
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

Also....

The RA Unit was bought in July so can I presume it includes the jumpers
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH Expansion Not Showing

Post by rimai »

Does it not show in the screen or it shows 0?
Roberto.
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

Showing 0

I have tested the probe and that's fine

Thanks for response
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH Expansion Not Showing

Post by rimai »

Is the green LED on the pH expansion module lit up?
Roberto.
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

Yes it is
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH Expansion Not Showing

Post by rimai »

Follow the instructions here:
http://forum.reefangel.com/viewtopic.php?p=14763#p14763
and paste the results
Roberto.
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

I2CScanner ready!
starting scanning of I2C bus from 1 to 128...
addr: 1 addr: 2 addr: 3 addr: 4
addr: 5 addr: 6 addr: 7 addr: 8
addr: 9 addr: A addr: B addr: C
addr: D addr: E addr: F addr: 10
addr: 11 addr: 12 addr: 13 addr: 14
addr: 15 addr: 16 addr: 17 addr: 18
addr: 19 addr: 1A addr: 1B addr: 1C
addr: 1D addr: 1E addr: 1F addr: 20 found!
addr: 21 addr: 22 addr: 23 addr: 24
addr: 25 addr: 26 addr: 27 addr: 28
addr: 29 addr: 2A addr: 2B addr: 2C
addr: 2D addr: 2E addr: 2F addr: 30
addr: 31 addr: 32 addr: 33 addr: 34
addr: 35 addr: 36 addr: 37 addr: 38
addr: 39 addr: 3A addr: 3B addr: 3C
addr: 3D addr: 3E addr: 3F addr: 40
addr: 41 addr: 42 addr: 43 addr: 44
addr: 45 addr: 46 addr: 47 addr: 48
addr: 49 addr: 4A addr: 4B addr: 4C
addr: 4D addr: 4E addr: 4F addr: 50 found!
addr: 51 addr: 52 addr: 53 addr: 54 found!
addr: 55 addr: 56 addr: 57 addr: 58
addr: 59 addr: 5A addr: 5B addr: 5C
addr: 5D addr: 5E addr: 5F addr: 60
addr: 61 addr: 62 addr: 63 addr: 64
addr: 65 addr: 66 addr: 67 addr: 68 found!
addr: 69 addr: 6A addr: 6B addr: 6C
addr: 6D addr: 6E addr: 6F addr: 70
addr: 71 addr: 72 addr: 73 addr: 74
addr: 75 addr: 76 addr: 77 addr: 78
addr: 79 addr: 7A addr: 7B addr: 7C
addr: 7D addr: 7E addr: 7F addr: 80

done
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

must I open the RA controller and check the jumpers?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH Expansion Not Showing

Post by rimai »

Yes, please.
The controller is not seeing the module as it is right now.
Roberto.
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

If I look at the controller with the joystick on my left, there are 4 pins.

The jumpers are positioned only on the right SCL and and SDA pin.

Should they not be positioned on both pins?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH Expansion Not Showing

Post by rimai »

There should be 6 pins total and all should be in the same position if you want to enable the expansion bus.
Roberto.
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

well if we call "0" a single pin and "--" a jumper, it looks as follows

0 0
0 - -
0 - -

Clearly this is wrong. Thought all units now came with the jumpers correctly added?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: PH Expansion Not Showing

Post by rimai »

You should have 3 jumpers and they all should be inserted... they should not be offset like you are showing...
Are you sure you only have 2 jumpers?
Roberto.
Lockes
Posts: 31
Joined: Fri Jul 20, 2012 4:04 am

Re: PH Expansion Not Showing

Post by Lockes »

Sorry my mistake there are 3 but the bottom 2 were offset.

I am going to try reset, upload my code and try again.

Thanks for the help thus far
Post Reply