Society of Robots - Robot Forum
Software => Software => Topic started by: Admin on February 03, 2010, 01:55:59 AM
-
Program your $50 Robot to use the photovore code, and point out any mistakes I made in the code.
http://www.societyofrobots.com/downloads/50_Robot_WebbotLib_Files/50_Robot_WebbotLib.zip (http://www.societyofrobots.com/downloads/50_Robot_WebbotLib_Files/50_Robot_WebbotLib.zip)
Its in beta, as I haven't tested it myself.
Also, you'll see in the code that I also wrote an optional fuzzy logic version of the photovore. Yeap, you too can have fuzzy logic! :P
-
For the photovore project file, I think the MCU is set as mega128 in the project options, needs to be set as 168/328. The sorscope project file is set correctly
Also I get these ADC errors, not sure what is going on - this is the first time using webbotlib so maybe I'm doing something wrong. I get similar ADC errors for the photovore file.
In file included from ../50_SoR_Scope.c:22:
../functions.h: In function 'ADC_1':
../functions.h:5: error: 'ADC0' undeclared (first use in this function)
../functions.h:5: error: (Each undeclared identifier is reported only once
../functions.h:5: error: for each function it appears in.)
../functions.h: In function 'ADC_8':
../functions.h:14: error: 'ADC0' undeclared (first use in this function)
../functions.h:15: error: 'ADC1' undeclared (first use in this function)
../functions.h:16: error: 'ADC2' undeclared (first use in this function)
../functions.h:17: error: 'ADC3' undeclared (first use in this function)
../functions.h:18: error: 'ADC4' undeclared (first use in this function)
../functions.h:19: error: 'ADC5' undeclared (first use in this function)
make: *** [50_SoR_Scope.o] Error 1
Build failed with 9 errors and 0 warnings...
-
@Admin - The ADC errors are because your code is built on Version 1.14 - which hasn't been released yet ;)
Use the original ADC_CH_xxxx names
-
Oops, forgot v1.14 isn't released yet . . .
ADC0 is the new ADC_CH_0 ;D
But still, SoR_Scope also uses ADC0 so it shouldn't have worked either . . .
-
i had a play with SoR Scope this morning and wasn't able to get it to work and i just gathered it was my problem. Good pick up Razor, webbot and admin.