Page 1 of 1

pc wont connect

Posted: Thu Apr 18, 2013 7:56 pm
by the2ndtinman
Just recieved my long awaited RA today, opened it and looked everything over, everything looks good.

Now my problem, I cannot get my PC to pick it up when it is hooked up through USB. It doesnt seem right to me but maybe it is, i have to have the head unit hooked up to the relay box and the relay box plugged in for the head unit to turn on, i would have thought if I plugged in the usb cable to the computer and the 6 wire cord into the head unit it would power it up. Maybe not.

Any help would be great and im sure I will have more questions later.

pc wont connect

Posted: Thu Apr 18, 2013 8:20 pm
by dbmet
You need to have the head unit plugged into the relay box, and the relay box plugged into the wall.

Re: pc wont connect

Posted: Thu Apr 18, 2013 8:25 pm
by the2ndtinman
Yes, I have done that but the pc won't recognize that the ra is plugged in via usb

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Thu Apr 18, 2013 8:43 pm
by the2ndtinman
core.a(main.cpp.o): In function `main':
C:\Program Files (x86)\Reef Angel Controller\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to `setup'
C:\Program Files (x86)\Reef Angel Controller\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'


is what I get when i try and upload to get stock program

Re: pc wont connect

Posted: Thu Apr 18, 2013 9:33 pm
by rimai
It looks like you have no code at all.
This error happens when you are trying to upload a blank sketch.

Re: pc wont connect

Posted: Thu Apr 18, 2013 9:58 pm
by the2ndtinman
Yes, during install of the program I never got the message saying drivers were installed even after waiting for a half hour.

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Thu Apr 18, 2013 10:11 pm
by rimai
Check your device manager. Do you have a USB Serial Adapter under COM & LPT Ports?

Re: pc wont connect

Posted: Thu Apr 18, 2013 10:28 pm
by the2ndtinman
Yes

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Thu Apr 18, 2013 10:31 pm
by rimai
So, you have the drivers installed correctly then.

Re: pc wont connect

Posted: Thu Apr 18, 2013 10:44 pm
by the2ndtinman
Crap.... I lied I think..... All it says is usb serial port(com3)

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Thu Apr 18, 2013 10:49 pm
by rimai
Yes, it is correct...
COM3 is the serial port you will use to communicate with the controller.
Drivers are installed correctly.

Re: pc wont connect

Posted: Thu Apr 18, 2013 10:58 pm
by the2ndtinman
So what am I doing wrong?

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Thu Apr 18, 2013 11:00 pm
by the2ndtinman
It doesn't say what's is connected just what port it is.

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Fri Apr 19, 2013 7:17 am
by rimai
It already did.
Your USB-TTL cable drivers are already installed correctly.
Windows doesn't see the controller. It only sees the cable and you communicate to the controller through the cable.
It's a USB-TTL cable from FTDI: http://www.ftdichip.com/Products/Cables ... Serial.htm
Now, you need to upload your code. Either copy one of the existing ones, use one of the example codes or generate one with the wizard.

Re: pc wont connect

Posted: Fri Apr 19, 2013 10:10 am
by the2ndtinman
I've tried making a scetch with wizard and when I try and upload it I get a bunch of errors

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Fri Apr 19, 2013 10:54 am
by rimai
Can you copy and paste the errors?

Re: pc wont connect

Posted: Fri Apr 19, 2013 11:26 am
by the2ndtinman
Yes give me just I while

Sent from my EVO using Tapatalk 2

Re: pc wont connect

Posted: Fri Apr 19, 2013 3:54 pm
by the2ndtinman
The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
Dimming Signal
Custom Main Screen
Relay Expansion Module
PH Expansion Module
Standard Menu
Binary sketch size: 29,270 bytes (of a 30,720 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 -patmega328p -cstk500v1 -P\\.\COM3 -b57600 -D -Uflash:w:C:\Users\NALOGS~1\AppData\Local\Temp\build1723728085333315681.tmp\sketch_apr19c.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 : \\.\COM3
Using Programmer : stk500v1
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: 3 [33]
avrdude: stk500_getsync(): not in sync: resp=0x33

avrdude done. Thank you.

Re: pc wont connect

Posted: Fri Apr 19, 2013 3:54 pm
by the2ndtinman
and here is the code


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

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port2Bit | Port5Bit | Port6Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit | Port3Bit;
ReefAngel.OverheatShutoffPortsE[0] = 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( 850 );


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

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


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

void loop()
{
ReefAngel.StandardHeater( Port1,551,815 );
ReefAngel.StandardATO( Port2,60 );
ReefAngel.StandardLights( Port3,15,0,0,0 );
ReefAngel.WavemakerRandom( Port5,4,100 );
ReefAngel.WavemakerRandom( Port6,24,100 );
////// Place your custom code below here


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

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

void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

// pH Expansion
ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,54, "PHE:" );
ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,39,54, ReefAngel.Params.PHExp );
pingSerial();

// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 74, TempRelay );
pingSerial();

// Relay Expansion
TempRelay = ReefAngel.Relay.RelayDataE[0];
TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
ReefAngel.LCD.DrawOutletBox( 12, 97, TempRelay );
pingSerial();

// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}

void DrawCustomGraph()
{
ReefAngel.LCD.DrawGraph( 5, 5 );
}
`

Re: pc wont connect

Posted: Fri Apr 19, 2013 3:55 pm
by rimai
Which RA do you have?

Re: pc wont connect

Posted: Fri Apr 19, 2013 4:02 pm
by the2ndtinman
just the regular not the plus

Re: pc wont connect

Posted: Fri Apr 19, 2013 4:10 pm
by rimai
Make sure you have Reef Angel controller w/ optiboot selected under Tools->Board