Error when uploading to the controller

New members questions
Post Reply
Cruzer
Posts: 39
Joined: Sun Nov 06, 2011 10:14 pm

Error when uploading to the controller

Post by Cruzer »

Hello all,

Well I had the PDE running, WiFi working. Even had the Iphone app up, then I decided to try and get a signature banner up. I read the thread that covers how to modify the PDE, made some changes, ran verify in the Audrino program to check it, then uploaded it to the board. I then diconnected the cable and plugged in the WiFi and the orange/yellow lights started flashing then would stop. The green light would come on then slowly blink. When I tried the Iphone App the yellow lights would start flashing again and the app would not work. I figured the PDE that I changed messed stuff up so I tried to upload my good PDE and now I get a Protocal Error anf will not upload. I rebooted the controller and my computer and still can not upload anything to the board. The screen on the controller flashes three times while it is trying to upload but the devices that the controller are controlling are not affected. The controller is still working as far as controlling the tank but can not upload anything to it. Here is a paste of the modified PDE that I loaded if that helps. Any ideas. Sorry that I have been spamming the board with issues, just trying to get this figured out. Was fantastic for the evening that I had everything working lol.

Code: Select all

// Autogenerated file by RAGen (v1.1.0.127), (01/22/2012 09:53)
// RA_012212_0953.pde
//
// This version designed for v0.8.5 Beta 17 or later

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define DateTimeSetup
#define DirectTempSensor
#define wifi
#define SIMPLE_MENU
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "Cruzer";
prog_char probe1_label[] PROGMEM = "Temp1";
prog_char probe2_label[] PROGMEM = "Temp2";
prog_char probe3_label[] PROGMEM = "Temp3";
prog_char relay1_label[] PROGMEM = "Relay1";
prog_char relay2_label[] PROGMEM = "Relay2";
prog_char relay3_label[] PROGMEM = "Relay3";
prog_char relay4_label[] PROGMEM = "Relay4";
prog_char relay5_label[] PROGMEM = "Relay5";
prog_char relay6_label[] PROGMEM = "Relay6";
prog_char relay7_label[] PROGMEM = "Relay7";
prog_char relay8_label[] PROGMEM = "Relay8";

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.FeedingModePorts = B10111001;
    ReefAngel.WaterChangePorts = B10111001;

    // Ports that are always on
    ReefAngel.Relay.On(Port6);
    ReefAngel.Relay.On(Port8);
    ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));
ReefAngel.Timer[4].SetInterval(180); // set interval to 180 seconds
ReefAngel.Timer[4].Start();
}


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



    // Specific functions
    ReefAngel.StandardATO(Port1);
    ReefAngel.StandardLights(Port2);
    ReefAngel.MHLights(Port3);
    ReefAngel.Wavemaker1(Port4);
    ReefAngel.Wavemaker2(Port5);
    ReefAngel.StandardHeater(Port7);

	ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Error when uploading to the controller

Post by rimai »

The code was missing just a couple brackets.

Code: Select all

// Autogenerated file by RAGen (v1.1.0.127), (01/22/2012 09:53)
// RA_012212_0953.pde
//
// This version designed for v0.8.5 Beta 17 or later

/* The following features are enabled for this PDE File: 
 #define DisplayImages
 #define DateTimeSetup
 #define DirectTempSensor
 #define wifi
 #define SIMPLE_MENU
 */


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

// Labels for the web banner
#include <avr/pgmspace.h>
prog_char id_label[] PROGMEM = "Cruzer";
prog_char probe1_label[] PROGMEM = "Temp1";
prog_char probe2_label[] PROGMEM = "Temp2";
prog_char probe3_label[] PROGMEM = "Temp3";
prog_char relay1_label[] PROGMEM = "Relay1";
prog_char relay2_label[] PROGMEM = "Relay2";
prog_char relay3_label[] PROGMEM = "Relay3";
prog_char relay4_label[] PROGMEM = "Relay4";
prog_char relay5_label[] PROGMEM = "Relay5";
prog_char relay6_label[] PROGMEM = "Relay6";
prog_char relay7_label[] PROGMEM = "Relay7";
prog_char relay8_label[] PROGMEM = "Relay8";

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.FeedingModePorts = B10111001;
  ReefAngel.WaterChangePorts = B10111001;

  // Ports that are always on
  ReefAngel.Relay.On(Port6);
  ReefAngel.Relay.On(Port8);
  ReefAngel.LoadWebBanner(pgm_read_word(&(webbanner_items[0])), SIZE(webbanner_items));
  ReefAngel.Timer[4].SetInterval(180); // set interval to 180 seconds
  ReefAngel.Timer[4].Start();
}


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


  // Specific functions
  ReefAngel.StandardATO(Port1);
  ReefAngel.StandardLights(Port2);
  ReefAngel.MHLights(Port3);
  ReefAngel.Wavemaker1(Port4);
  ReefAngel.Wavemaker2(Port5);
  ReefAngel.StandardHeater(Port7);

  ReefAngel.ShowInterface();
}

Can you try unplugging the USB-TTL cable and plugging it back in. Then try uploading the code.
I've seen people having issues with uploading code and this seemed to solve the problem.
If it does not, go to Control Panel->System->Device Manager and delete the USB Serial Port device and let Windows reinstall the drivers.
Roberto.
Cruzer
Posts: 39
Joined: Sun Nov 06, 2011 10:14 pm

Re: Error when uploading to the controller

Post by Cruzer »

I think it might be a Com port issue. When I go to RAgen and click "find controller" it says it can not find Com port 7. I went to the device manager and changed the port that is was showing from 4 to 7 but does not make a difference. I aslo removed the Com device and plugged the cable back in but it defaults to com 4. Not sure if this has anything to do with it.

Roberto, I was typing while you replied, I have completed the reccomendations that you have given already.
Cruzer
Posts: 39
Joined: Sun Nov 06, 2011 10:14 pm

Re: Error when uploading to the controller

Post by Cruzer »

The controller is now cycling my main lights on and off, it has never done that before.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Error when uploading to the controller

Post by rimai »

Were you able to upload your PDE again?
Roberto.
Cruzer
Posts: 39
Joined: Sun Nov 06, 2011 10:14 pm

Re: Error when uploading to the controller

Post by Cruzer »

I tried the suggestions that you made but it did not help. I uninstalled the "Reef Angle Controller" then downloaded and installed it again. I then updated the libraries again and was able to upload my good PDE file. Everything is working now, except it is cycling my main lights. Going to give it a little time and see.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Error when uploading to the controller

Post by rimai »

How long is this on/off cycle?
Roberto.
Cruzer
Posts: 39
Joined: Sun Nov 06, 2011 10:14 pm

Re: Error when uploading to the controller

Post by Cruzer »

I have not timmed it but every 10 minutes or so. The oulet is being turned off, thought maybe it was the light but it is fine and has never given me any problems.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Error when uploading to the controller

Post by rimai »

I'm looking at your code and saw that you have WM on port 4 and 5.
Do you have powerheads connected to it?
Have you had them in wavemaker mode before?
Roberto.
Cruzer
Posts: 39
Joined: Sun Nov 06, 2011 10:14 pm

Re: Error when uploading to the controller

Post by Cruzer »

I have one powerhead plugged in. I have port 4 and 5 in "always on" right now because I am not using those outlets for wave making, only to run a powerhead all the time. It seems to have stopped cycling, and I have successfuly uploaded a couple more times. Thank you for you help.
Post Reply