Page 1 of 1

Help can't upload...

Posted: Sun Sep 02, 2012 4:09 am
by catman78
Hi all,

trying to get going here and had a few ?
1. Controller has 8 pin connector and USB cable has 6 pin female
Where do I connect to?

2. Maybe 1 has to do with error I'm receiving when trying to upload.
Keeps saying error occoured try again. "Set RTS on Close" is enabled for port 5.

I'm using the Wizard to upload. Basic stuff, code looks fine.

thanks

Re: Help can't upload...

Posted: Sun Sep 02, 2012 8:01 am
by rimai
1. Please refer to the users manual. It shows a photo of how it should be conneted.
2. Most likely you are connecting it wrong or you have the wrong board. Make sure you select the correct board on Tools->Board.

Re: Help can't upload...

Posted: Sun Sep 02, 2012 9:32 am
by catman78
Thanks Roberto,

Have it plugged in correctly now.
still getting error.
I have basic Reef Angel Controller. I selected that from Tools/ board.

I then selected File/Upload.

Here's message

The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
Dimming Signal
Standard Menu
Binary sketch size: 27,394 bytes (of a 30,720 byte maximum)
C:\Program Files\Reef Angel Controller\hardware/tools/avr/bin/avrdude -CC:\Program Files\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cstk500v1 -P\\.\COM5 -b57600 -D -Uflash:w:C:\Users\Mark\AppData\Local\Temp\build7155545787251712395.tmp\sketch_sep01a.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\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf"

Using Port : \\.\COM5
Using Programmer : stk500v1
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x0c

avrdude done. Thank you.

Re: Help can't upload...

Posted: Sun Sep 02, 2012 9:46 am
by rimai
If you didn't buy your RA 2 years ago, you must use Reef Angel Controller w/ optiboot.

Re: Help can't upload...

Posted: Sun Sep 02, 2012 10:05 am
by catman78
tried that, still n/g. same error message

Re: Help can't upload...

Posted: Sun Sep 02, 2012 10:06 am
by catman78
here's the code I'm trying to uplaod.

#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 <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
ReefAngel.AddStandardMenu(); // Add Standard Menu

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


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

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


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

void loop()
{
ReefAngel.StandardLights( Port2,11,45,20,0 );
ReefAngel.StandardLights( Port3,12,0,18,30 );
ReefAngel.StandardLights( Port4,21,0,10,0 );
ReefAngel.PWM.SetDaylight( PWMSlope(11,0,20,30,10,100,60,10) );
ReefAngel.PWM.SetActinic( PWMSlope(10,30,21,0,10,100,60,10) );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.ShowInterface();
}

Re: Help can't upload...

Posted: Sun Sep 02, 2012 10:10 am
by rimai
It's not related to the code.
You have the black wire all the way to the right pin, correct?
Does the controller reboot a few seconds after you hit upload?
Can you post a pic of your connection and the error message you are getting with the new board selected?

Re: Help can't upload...

Posted: Sun Sep 02, 2012 10:26 am
by catman78
rimai wrote:It's not related to the code.
You have the black wire all the way to the right pin, correct?
Does the controller reboot a few seconds after you hit upload?
Can you post a pic of your connection and the error message you are getting with the new board selected?

yes,

Image

controller reboots after upload selected

error uploading

The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
Dimming Signal
Standard Menu
Binary sketch size: 27,394 bytes (of a 32,256 byte maximum)
C:\Program Files\Reef Angel Controller\hardware/tools/avr/bin/avrdude -CC:\Program Files\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\Mark\AppData\Local\Temp\build9023571786502720875.tmp\sketch_sep01a.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\Reef Angel Controller\hardware/tools/avr/etc/avrdude.conf"

Using Port : \\.\COM5
Using Programmer : arduino
Overriding Baud Rate : 115200
Rebooting Reef Angel Controller
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x64

avrdude done. Thank you.

Re: Help can't upload...

Posted: Sun Sep 02, 2012 10:40 am
by rimai
And you are positive that COM5 is the correct serial port, right?

Re: Help can't upload...

Posted: Sun Sep 02, 2012 10:44 am
by catman78
yeah, . When I plug in USB cable 5 becomes enabled.