Society of Robots - Robot Forum

Software => Software => Topic started by: ErikY on July 13, 2012, 09:31:43 AM

Title: New AVRStudio Project
Post by: ErikY on July 13, 2012, 09:31:43 AM
So I just successfully finished the $50 robot and I am now hungry for more!

The first thing I want to do is take my $50 robot board and start playing with the code to try to do some different things with my modified servo's and my photoresistor sensors.

When I built the $50 robot, I copied the project and followed the instructions laid out by Admin in the tutorial, everything worked well. I am able to build the project, and I am able to program the mcu.

So now I tried making a new project, but naming it something different, ServoTest.

Everything else I am doing pretty much exactly as Admin described.

The one thing I did do is modify the makefile to use the target ServoTest instead of Photovore_1

I wrote some simple code in the .c file in the source, I imported the SOR_utils.h file, and I tried to compile.

When i build, I am consistently failing with the error:


ServoTest.c:56:30: error: invalid digit "9" in octal constant


referring to the following line of code, which is taken directly from the photovore_v1.c which is working fine.

   sensor_left=a2dConvert8bit(0829995);



Now, I am a developer, and I am interpreting that to mean that I am using a 9 in a constant that can only accept the numbers 0-8, I may be wrong.

What I don't understand at all is why this worked when I named my project photovore_v1, and why this is not working under a new project name.

I looked through the makefile, and I am not really seeing anything else.

can anyone help me out here?

Thx.
Title: Re: New AVRStudio Project
Post by: ErikY on July 13, 2012, 10:00:10 AM
Everyone, sorry for this.

I figured it out, I actually removed the leading 0 and it worked.

I have no idea why this project required me to remove the leading 0, and the original one allowed it, but it is working now.