Reef Angel IPhone App not working??

New members questions
Post Reply
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Reef Angel IPhone App not working??

Post by Saltydogg »

Finally got wifi adapter working and web page works when entering my IP address. I then wrote a memory code with the RAGen and yes I enabled the wifi. Not sure where I am falling short. I have attached memory code and Controller code. PLease help am i doing something wrong? Not quite grasping the coding aspect yet.

MEMORY FILE
// Autogenerated file by RAGen (v1.2.2.171), (05/27/2012 10:52)
// Memory_052712_1052.ino
//
// This file sets the default values to the Internal Memory
//


#include <ReefAngel_Features.h>
#include <Globals.h>
#include <Time.h>
#include <OneWire.h>
#include <RA_NokiaLCD.h>
#include <avr/pgmspace.h>
#include <InternalEEPROM.h>
#include <Wire.h>
#include <Memory.h>


RA_NokiaLCD e;

void setup()
{
    e.Init();
    e.Clear(COLOR_WHITE,0,0,132,132);
    e.BacklightOn();

    InternalMemory.MHOnHour_write(10);
    InternalMemory.MHOnMinute_write(0);
    InternalMemory.MHOffHour_write(20);
    InternalMemory.MHOffMinute_write(0);
    InternalMemory.StdLightsOnHour_write(8);
    InternalMemory.StdLightsOnMinute_write(0);
    InternalMemory.StdLightsOffHour_write(21);
    InternalMemory.StdLightsOffMinute_write(0);
    InternalMemory.WM1Timer_write(200);
    InternalMemory.WM2Timer_write(354);
    InternalMemory.DP1Timer_write(10);
    InternalMemory.DP2Timer_write(10);
    InternalMemory.FeedingTimer_write(900);
    InternalMemory.LCDTimer_write(600);
    InternalMemory.OverheatTemp_write(1150);
    InternalMemory.LEDPWMDaylight_write(78);
    InternalMemory.LEDPWMActinic_write(78);
    InternalMemory.HeaterTempOn_write(780);
    InternalMemory.HeaterTempOff_write(791);
    InternalMemory.ChillerTempOn_write(810);
    InternalMemory.ChillerTempOff_write(785);
    InternalMemory.ATOTimeout_write(60);
    InternalMemory.PHMax_write(889);
    InternalMemory.PHMin_write(523);
    InternalMemory.MHDelay_write(5);
    InternalMemory.DP1OnHour_write(20);
    InternalMemory.DP1OnMinute_write(0);
    InternalMemory.DP2OnHour_write(22);
    InternalMemory.DP2OnMinute_write(30);
    InternalMemory.ATOHourInterval_write(0);
    InternalMemory.ATOHighHourInterval_write(0);
    InternalMemory.ATOHighTimeout_write(60);
    InternalMemory.DP1RepeatInterval_write(0);
    InternalMemory.DP2RepeatInterval_write(0);
    InternalMemory.SalMax_write(2550);
    InternalMemory.PWMSlopeStartD_write(15);
    InternalMemory.PWMSlopeEndD_write(100);
    InternalMemory.PWMSlopeDurationD_write(60);
    InternalMemory.PWMSlopeStartA_write(15);
    InternalMemory.PWMSlopeEndA_write(100);
    InternalMemory.PWMSlopeDurationA_write(60);
    InternalMemory.RFMode_write(0);
    InternalMemory.RFSpeed_write(100);
    InternalMemory.RFDuration_write(10);
    InternalMemory.PWMSlopeStart0_write(15);
    InternalMemory.PWMSlopeEnd0_write(100);
    InternalMemory.PWMSlopeDuration0_write(60);
    InternalMemory.PWMSlopeStart1_write(15);
    InternalMemory.PWMSlopeEnd1_write(100);
    InternalMemory.PWMSlopeDuration1_write(60);
    InternalMemory.PWMSlopeStart2_write(15);
    InternalMemory.PWMSlopeEnd2_write(100);
    InternalMemory.PWMSlopeDuration2_write(60);
    InternalMemory.PWMSlopeStart3_write(15);
    InternalMemory.PWMSlopeEnd3_write(100);
    InternalMemory.PWMSlopeDuration3_write(60);
    InternalMemory.PWMSlopeStart4_write(15);
    InternalMemory.PWMSlopeEnd4_write(100);
    InternalMemory.PWMSlopeDuration4_write(60);
    InternalMemory.PWMSlopeStart5_write(15);
    InternalMemory.PWMSlopeEnd5_write(100);
    InternalMemory.PWMSlopeDuration5_write(60);
    InternalMemory.IMCheck_write(0x5241494D);
}

void loop()
{
    // display success screen
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, "Internal Memory Set");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*4, "Now load your");
    e.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, " RA code file");
    delay(5000);
}
Last edited by Saltydogg on Sun May 27, 2012 9:17 am, edited 1 time in total.
Image
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Re: Reef Angel App not working??

Post by Saltydogg »

Controller Code (Same code I was using prior to Wifi Adapter being added?)
// Autogenerated file by RAGen (v1.2.1.158), (05/23/2012 20:25)
// RA_052312_2025.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define SIMPLE_MENU
*/


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


void setup()
{
    ReefAngel.Init(); //Initialize controller

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

void loop()
{
    // Specific functions
    ReefAngel.SingleATOHigh(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.Relay.DelayedOn(Port4, 1);
    ReefAngel.StandardHeater(Port7);

    ReefAngel.ShowInterface();
}

Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Reef Angel IPhone App not working??

Post by rimai »

Everything looks good.
On the iPhone app. make sure that you have direct connection selected to on.
Roberto.
User avatar
Saltydogg
Posts: 20
Joined: Sat Feb 18, 2012 3:59 pm

Re: Reef Angel IPhone App not working??

Post by Saltydogg »

That was it thanks Roberto. Next challenge seems my controls tab on the iPhone App are working but the names for the relay box are not accurate with how I have my actual relay box configured? How can I change the names?
Image
Post Reply