I loaded the new 08 default code to the robot, but it won’t respond to the controllers and it will not respond when I give it a value of 255.
I read kevins post about upgrading the software to use the new code, but that just helped me to beable to load it to the bot.
I also noticed he removed the printf code.
how did other teams get their bot going?
and can someone tell me if I can add printf and how?
I just tried to program autonomys and I found that I am able to control the pwm(s) with static statements such as:
pwm=255
that should set pwm01 to p1_y, pwm02 to p2_y, etc.
You can edit the function in ifi_code.c
Look in the forum for help for beginning programming, there are several threads in existence already
Thanks for the reply,but does it matter where I put it?
I tried adding that code but I get an error
“Clean: Deleting intermediary and output files.
Clean: Done.
Executing: “C:\mcc18\bin\mcc18.exe” -p=18F8722 “autonomous.c” -fo=“autonomous.o” -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Thread would not exit normally.
Could not read language tool output from pipe. (5)
A language-plugin exception occurred and was logged.
BUILD FAILED: Sat Feb 02 12:55:39 2008”
Yeah thats what I have been doing for a few hours now.
I looked under beginning programming I can’t find anything.
What else should I search for, cause I don’t even know what to call my problem?
As far as I know there’s been maybe one thread about this… And it wasn’t really resolved. At least I haven’t heard of this before.
Anyway, what version of mcc18 are you using? The build commands are a bit weird, (the disabling of the removement of unreachable code, and all the other minuses), but it doesn’t look like that is causing an issue. Does this error still occur even without a printf? As this looks like a compiler issue.
And by default code, do you mean the FIRST default code or Kevin Watson’s code?
Where did you get 2008 default code? I looked on ifirobotics.com and couldn’t find anything newer than 2007. I also looked on kevin.org and didn’t see anything there that looked like '08 default code.
There really isn’t a 2008 default code, so I suppose ‘default’ would be 2007’s default code. The real difference is that it’s only compatible with the 2.4 version, thus the topic title of the sticky. (Sorry, I’m not the most knowledgeable about the compiler…)
That looks right for Kevin’s sensorless code, there are version available with the gyro and stuff, if you want it.
I don’t think you should abandon Kevin’s code yet, it really is very handy. However, bulky code that works is better than elegant code that doesn’t. I’d save this as a last attempt.
What version of MPLAB are you using? There might a problem there, try reinstalling with 8.0+ or something. (I don’t know MPLAB well either, just a thought.) And looking at the build stuff again… Do you have the include search path at C:\mcc18-3.10\h or similar? That’s set by right clicking the project, (.mcp), selecting Build Options and using the Directories tab.
So this compiles correctly without printfs? Or has it never worked correctly? If it has been built successfully at some point, what edit exactly caused the error?
Thanks everyone for your help.
We didn’t know where to put the Default_Routines(); but as you will see we found it was already there and in the right place.
If this is happening to anyone else here is what we did: