error compiling

Share you PDE file with our community
Post Reply
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

error compiling

Post by jgriffith »

I just changed my pde to enable web banners (or at least tried to:)). Not sure what happened, but i now have an error compiling when I try to upload.
// Autogenerated file by RAGen (v1.2.1.158), (03/18/2012 10:21)
// RA_031812_1021.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define wifi
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 4
*/


#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>

#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "jgriffith";
prog_char probe1_label[] PROGMEM = "water";
prog_char probe2_label[] PROGMEM = "room";
prog_char probe3_label[] PROGMEM = "lights";
prog_char relay1_label[] PROGMEM = "lights";
prog_char relay2_label[] PROGMEM = "actinic";
prog_char relay3_label[] PROGMEM = "high noon";
prog_char relay4_label[] PROGMEM = "moon lights";
prog_char relay5_label[] PROGMEM = "fuge lights";
prog_char relay6_label[] PROGMEM = "dosing pump";
prog_char relay7_label[] PROGMEM = "ato";
prog_char relay8_label[] PROGMEM = "heater";
PROGMEM const char *webbanner_items[] = {
    id_label, probe1_label, probe2_label, probe3_label, relay1_label, relay2_label,
    relay3_label, relay4_label, relay5_label, relay6_label, relay7_label, relay8_label};

void setup()
{
    ReefAngel.Init(); //Initialize controller
    ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));

    // Initialize and start the timer
    ReefAngel.Timer[4].SetInterval(60); // set interval to 180 seconds
    ReefAngel.Timer[4].Start();
}

void loop()
{
    ReefAngel.ShowInterface();
    
    // Specific functions
    ReefAngel.StandardLights(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3); // Uses MHLights schedule for high noon lights
    ReefAngel.StandardLights(Port4,120); // Offset 120 minutes from Port1
    ReefAngel.MoonLights(Port5); // Inverse cycle of Port1
    ReefAngel.DosingPump1(Port6);
    ReefAngel.StandardATO(Port7);
    ReefAngel.StandardHeater(Port8);

    ReefAngel.PWM.SetActinic(PWMSlope(10,0,22,0,15,55,120,15));
    ReefAngel.PWM.SetDaylight(PWMSlope(11,0,21,0,15,55,120,15));

    if ( ReefAngel.Timer[4].IsTriggered() )
    {
        ReefAngel.Timer[4].Start();
        ReefAngel.WebBanner();
      }


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

Re: error compiling

Post by rimai »

The WebBanner() function was replaced with the Portal() function.
Use this instead:

Code: Select all

// Autogenerated file by RAGen (v1.2.1.158), (03/18/2012 10:21)
// RA_031812_1021.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define wifi
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 4
*/


#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
}

void loop()
{
    ReefAngel.ShowInterface();
    
    // Specific functions
    ReefAngel.StandardLights(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3); // Uses MHLights schedule for high noon lights
    ReefAngel.StandardLights(Port4,120); // Offset 120 minutes from Port1
    ReefAngel.MoonLights(Port5); // Inverse cycle of Port1
    ReefAngel.DosingPump1(Port6);
    ReefAngel.StandardATO(Port7);
    ReefAngel.StandardHeater(Port8);

    ReefAngel.PWM.SetActinic(PWMSlope(10,0,22,0,15,55,120,15));
    ReefAngel.PWM.SetDaylight(PWMSlope(11,0,21,0,15,55,120,15));

    ReefAngel.Portal("jgriffith");
} 
Roberto.
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

So I made it way too complicated? All I had to add from my previous code was that last part "ReefAngel.Portal ("jgriffith");"?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: error compiling

Post by rimai »

yeap :)
That's the controller ever evolving :shock:
Before you used to have to do all that to get the banner.
Now, just add the Portal() function.
Roberto.
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

Nice, thanks once again for your help!

I just noticed that on my portal it shows my moonlights still on, the mainlights are now on, according to the above code shouldnt they be offnow? Port 4 should be moonlights, port 5 says moonlights but those are fuge and appear to be correct (reverse cycle)
Image
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

I am now gettig errors unable to rename 'core.a'; reason Permission denied

I just went back to a previous code and added the portal function, looks good, time to upload
Image
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

I just uploaded the following code and the webbanner has not updated, I also can't see charts in the portal, am I missing something?

Edit, it works now...I guess I'm impatient :)

I think the only thing I need to fix is the moonlights on Port 4, I would like them on 2 hours b/f and after the main lights (port 1)
// Autogenerated file by RAGen (v1.2.1.158), (03/18/2012 10:17)
// RA_031812_1017.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define DateTimeSetup
#define VersionMenu
#define DisplayLEDPWM
#define wifi
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 4
*/


#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>

#include <avr/pgmspace.h>
prog_char menu0_label[] PROGMEM = "Item 1";
prog_char menu1_label[] PROGMEM = "Item 2";
prog_char menu2_label[] PROGMEM = "Item 3";
prog_char menu3_label[] PROGMEM = "Item 4";
PROGMEM const char *menu_items[] = {
menu0_label, menu1_label, menu2_label, menu3_label  };

void MenuEntry1()
{
    ReefAngel.DisplayMenuEntry("Item 1");
}
void MenuEntry2()
{
    ReefAngel.DisplayMenuEntry("Item 2");
}
void MenuEntry3()
{
    ReefAngel.DisplayMenuEntry("Item 3");
}
void MenuEntry4()
{
    ReefAngel.DisplayMenuEntry("Item 4");
}


void setup()
{
    ReefAngel.Init(); //Initialize controller
    ReefAngel.InitMenu(pgm_read_word(&(menu_items[0])),SIZE(menu_items));

}

void loop()
{
    ReefAngel.ShowInterface();

    // Specific functions
    ReefAngel.StandardLights(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3); //Uses MHLights schedule for high noon lights
    ReefAngel.StandardLights(Port4,120); // Offsets 120 minutes from Port1
    ReefAngel.MoonLights(Port5); //Inverse cycle of Port1
    ReefAngel.DosingPump1(Port6);
    ReefAngel.StandardATO(Port7);
    ReefAngel.StandardHeater(Port8);

    ReefAngel.PWM.SetActinic(PWMSlope(10,0,22,0,15,55,120,15));
    ReefAngel.PWM.SetDaylight(PWMSlope(11,0,21,0,15,55,120,15));

    ReefAngel.Portal("jgriffith");
}

Image
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

Anyone know how I can code port 4 to come on 2 hours before port 1, turn off when port 1 is on, then come on when port 1 is off for 2 hours, then off?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: error compiling

Post by rimai »

Right now, they are already turning on and off with 2hour offset, right?
You just want to have them turn off when port 1 is on, correct?
Roberto.
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

Yes, although I guess its not that big of a deal to leave them on, the leds are going to last forever anyways.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: error compiling

Post by rimai »

Ok, so if all you want to do is turn them off whe Port1 is on, try this:

Code: Select all

    if (ReefAngel.Relay.Status(Port1)) ReefAngel.Relay.Off(Port4);
Add it just below this:

Code: Select all

    ReefAngel.StandardLights(Port4,120); // Offsets 120 minutes from Port1
Roberto.
jgriffith
Posts: 42
Joined: Fri Mar 02, 2012 12:39 pm

Re: error compiling

Post by jgriffith »

great, thanks

Sorry I think I clicked on report post earlier by mistake.
Image
Post Reply