View Full Version : even simple autonomous code doesn't work??
colman77
17-02-2006, 20:11
OK so autonomous mode doesn't seem to have control of the robot...
We are putting our robot into autonomous mode by setting the tean number to 0 on the OI, yanking out the tether cable, and resetting.
We know that it's running the autonomous function in user_routines_fast.c, because we can put a printf in there and it'll print.
However.
If we put ANY statement controlling the pwm's-- no matter how simple-- our victors refuse to do anything but blink orange.
Even if we put
pwm01 = pwm02 = pwm03 = pwm04 = 255;
LIGHTS DON'T CHANGE... and if we hook a fan up to any of them, it doesn't spin.
Any ideas? The lights on the victors DO change when you're in autonomous, right?
Salik Syed
17-02-2006, 20:43
OK so autonomous mode doesn't seem to have control of the robot...
We are putting our robot into autonomous mode by setting the tean number to 0 on the OI, yanking out the tether cable, and resetting.
We know that it's running the autonomous function in user_routines_fast.c, because we can put a printf in there and it'll print.
However.
If we put ANY statement controlling the pwm's-- no matter how simple-- our victors refuse to do anything but blink orange.
Even if we put
pwm01 = pwm02 = pwm03 = pwm04 = 255;
LIGHTS DON'T CHANGE... and if we hook a fan up to any of them, it doesn't spin.
Any ideas? The lights on the victors DO change when you're in autonomous, right?
ummm... printf does not run during autonomous ! i would suggest building a dongle, look up white papers on how to do this... its fairly easy... if ur in a hurry grab one of those 13pin (?) competition port size cable plug it in and short the right wires
Matt Krass
17-02-2006, 20:52
ummm... printf does not run during autonomous ! i would suggest building a dongle, look up white papers on how to do this... its fairly easy... if ur in a hurry grab one of those 13pin (?) competition port size cable plug it in and short the right wires
A generalization like is silly, I've run printf's in autonomous, you simply need the stdio.h present.
It's been my experience that setting the team number to 0 does induce autonomous, but without an OI attached the robot remains disabled, so the motor outputs are blocked, just like regular disabled mode. You're better off connecting the OI and building the dongle, it takes fifteen minutes or so.
Salik Syed
17-02-2006, 21:11
whoops... my bad... yeah you could definitely run printf during autonomous... but by default it is not included so maybe thats an indication that ur not really in autonomous mode... thats what I should've said...
Mark McLeod
17-02-2006, 23:58
See if this persons solution helps you.
http://www.chiefdelphi.com/forums/showpost.php?p=455405&postcount=4
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.