Cannot upload code

New members questions
Post Reply
cjrudy
Posts: 135
Joined: Sat Nov 10, 2012 2:47 pm

Cannot upload code

Post by cjrudy »

I have generated some basic code using the wizard, when I try to upload it errors. Here is the code, and the error.
#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 <ReefAngel.h>

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


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


void setup()
{
    // This must be the first line
    ReefAngel.Init(); //Initialize controller
    // 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( 840 );


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

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,11,30,21,30 );
    ReefAngel.StandardLights( Port2,12,30,20,30 );
    ReefAngel.StandardHeater( Port3,778,788 );
    ReefAngel.StandardHeater( Port4,780,790 );
    ReefAngel.StandardATO( Port8,60 );
    ////// Place your custom code below here
    

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

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

And the error .............

The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
Wifi Attachment
Simple Menu
Binary sketch size: 30,478 bytes (of a 258,048 byte maximum)
C:\Program Files (x86)\Reef Angel Controller\hardware/tools/avr/bin/avrdude -CC:\Program Files (x86)\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P\\.\COM9 -b115200 -D -Uflash:w:C:\Users\CRUDEW~1\AppData\Local\Temp\build3507860604110621111.tmp\sketch_dec30a.cpp.hex:i

avrdude: Version 6.0, compiled on Apr 6 2012 at 19:29:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf"

Using Port : \\.\COM9
Using Programmer : stk500v2
Overriding Baud Rate : 115200
Rebooting Reef Angel Controller
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Cannot upload code

Post by rimai »

Do you have RA or RA+?
Did you try any other serial port?

Sent from my Galaxy S3 using Tapatalk 2
Roberto.
cjrudy
Posts: 135
Joined: Sat Nov 10, 2012 2:47 pm

Re: Cannot upload code

Post by cjrudy »

I have the RA + and have selected it, I also have tried three different COM ports on my laptop
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Cannot upload code

Post by rimai »

Does the controller reboot when you hit upload right after it displays "Rebooting Reef Angel Controller"?
Roberto.
cjrudy
Posts: 135
Joined: Sat Nov 10, 2012 2:47 pm

Re: Cannot upload code

Post by cjrudy »

No it does not reboot
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Cannot upload code

Post by rimai »

Were you ever able to upload any code?
Roberto.
cjrudy
Posts: 135
Joined: Sat Nov 10, 2012 2:47 pm

Cannot upload code

Post by cjrudy »

No, just got the RA+ up and running the day after Xmas. This was my first attempt to upload code
Post Reply