Ok, I got it to debug and see the variables on a simple test code.
I got an additional problem now.
When I try compiling a more complex code, I get this error message:
VisualStudioTest.cpp.o : In function `loop'
VisualStudioTest.cpp : SetChannel(unsigned char, unsigned char)'
VisualStudioTest.cpp : SetChannel(unsigned char, unsigned char)'
VisualStudioTest.cpp : SetChannel(unsigned char, unsigned char)'
VisualStudioTest.cpp : SetChannel(unsigned char, unsigned char)'
VisualStudioTest.cpp : SetChannel(unsigned char, unsigned char)'
VisualStudioTest.cpp.o : SetChannel(unsigned char, unsigned char)' follow
avr-objcopy* : No such file
avr-objcopy* : No such file
Couldn't determine program size: C:\Program Files (x86)\Reef Angel Controller\hardware\tools\avr\bin\avr-size: udioTest.hex': No such file
This same code compiles fine on Arduino.
Here is the code
#include <Salinity.h>
#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 <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>
byte x,y;
char text[10];
void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.Clear(BtnActiveColor,5,0,127,11);
ReefAngel.LCD.DrawText(DefaultBGColor,BtnActiveColor,30,3,"My Reef Angel");
ReefAngel.LCD.DrawDate(6, 122);
pingSerial();
ReefAngel.LCD.DrawMonitor(15, 20, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
pingSerial();
ReefAngel.LCD.Clear(DefaultFGColor,5,52,127,52);
ReefAngel.LCD.DrawText(COLOR_DARKGOLDENROD,DefaultBGColor,30,55,"PWM Expansion");
x=15;
y=68;
for (int a=0;a<6;a++)
{
if (a>2) x=75;
if (a==3) y=68;
ReefAngel.LCD.DrawText(COLOR_DARKGOLDENROD,DefaultBGColor,x,y,"Ch :");
ReefAngel.LCD.DrawText(COLOR_DARKGOLDENROD,DefaultBGColor,x+12,y,a);
ConvertNumToString(text, ReefAngel.PWM.GetChannelValue(a), 1);
strcat(text," ");
ReefAngel.LCD.DrawText(COLOR_DARKGOLDENROD,DefaultBGColor,x+24,y,text);
y+=10;
}
pingSerial();
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 103, TempRelay);
}
void DrawCustomGraph()
{
}
/*
For more information about custom main screen: http://forum.reefangel.com/viewtopic.php?f=14&t=109
*/
void setup()
{
ReefAngel.Init(); //Initialize controller
}
void loop()
{
ReefAngel.PWM.SetChannel(0,PWMSlope(9,0,17,0,15,100,60,15));
ReefAngel.PWM.SetChannel(1,PWMSlope(9,0,17,0,15,60,60,15));
ReefAngel.PWM.SetChannel(2,PWMSlope(9,30,16,30,15,100,60,15));
ReefAngel.PWM.SetChannel(3,PWMSlope(9,30,16,30,15,100,90,15));
ReefAngel.PWM.SetChannel(4,PWMSlope(9,0,17,0,15,75,30,15));
ReefAngel.PWM.SetChannel(5,PWMSlope(11,0,14,0,15,30,20,15));
ReefAngel.ShowInterface();
}