Wizard keeps giving error

Related to the development libraries, released by Curt Binder
Post Reply
Toolboy
Posts: 31
Joined: Wed Apr 25, 2012 9:26 am

Wizard keeps giving error

Post by Toolboy »

Hi

Im trying to add my new PWM unit

Ive compiled my code with the wizard and when I say upload I keep getting an upload error

Below is my 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.SetTemperatureUnit( Celsius ); // set to Celsius Temperature

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port1Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 270 );


// Ports that are always on
ReefAngel.Relay.On( Port2 );
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.StandardHeater( Port1,250,255 );
ReefAngel.StandardFan( Port3,250,260 );
ReefAngel.StandardFan( Port4,250,260 );
ReefAngel.PWM.SetChannel( 0, PWMSlope(9,0,0,0,15,100,60,15) );
ReefAngel.PWM.SetChannel( 1, PWMSlope(13,0,0,0,15,100,60,15) );
ReefAngel.PWM.SetChannel( 2, PWMSlope(13,0,0,0,15,100,60,15) );
ReefAngel.PWM.SetChannel( 3, PWMSlope(13,0,0,0,15,100,60,15) );
ReefAngel.PWM.SetChannel( 4, PWMSlope(13,0,0,0,15,100,60,15) );
ReefAngel.PWM.SetChannel( 5, PWMSlope(13,0,0,0,15,100,60,15) );
////// Place your custom code below here


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

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

void DrawCustomMain()
{
int x,y;
char text[10];
// Dimming Expansion
x = 15;
y = 2;
for ( int a=0;a<6;a++ )
{
if ( a>2 ) x = 75;
if ( a==3 ) y = 2;
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :" );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a );
ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,ReefAngel.PWM.GetChannelValue(a) );
y += 10;
}
pingSerial();

// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 43, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

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

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

void DrawCustomGraph()
{
}


This is from status block

The following features were automatically added:
Watchdog Timer
Version Menu

The following features were detected:
Dimming Expansion Module
Dimming Signal
Wifi Attachment
Custom Main Screen
Simple Menu
Binary sketch size: 28,790 bytes (of a 32,256 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 -carduino -P\\.\COM4 -b115200 -D -Uflash:w:C:\Users\Aceri3\AppData\Local\Temp\build6998029222006006884.tmp\sketch_apr01b.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 : \\.\COM4
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.



One last issue is that if I put my settings into internal memory I cant decide what time the pwm switches on the lights. Yet if I select put setting in to the code I can choose the time. How or where can I change the time for in internal memory code

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

Re: Wizard keeps giving error

Post by rimai »

Do you have the correct port and correct board selected?
Roberto.
Toolboy
Posts: 31
Joined: Wed Apr 25, 2012 9:26 am

Re: Wizard keeps giving error

Post by Toolboy »

Yes. And I solved my problem

Reset pins to original. Uploaded code. Then put the other two pin connectors in. Works 100%

Just partially blind from looking into the leds
Post Reply