PDA

View Full Version : printf statements do not display in autonomous mode


PVC Pirates
02-21-2005, 10:56 PM
When I try to use a printf statement in the autonomous code, nothing displays on the console on the computer that is connected to the RC. I don't know why the printf statements don't work, but the autonomous code doesn't entirely work correctly either. Is it possible that the two problems are related? Even if they are unrelated, I need the printf statements to help me fix the problem.

Any insight into this problem would be appreciated.

neilsonster
02-21-2005, 11:04 PM
When I try to use a printf statement in the autonomous code, nothing displays on the console on the computer that is connected to the RC. I don't know why the printf statements don't work, but the autonomous code doesn't entirely work correctly either. Is it possible that the two problems are related? Even if they are unrelated, I need the printf statements to help me fix the problem.

Any insight into this problem would be appreciated.


Well this might be obvious but have you #included printf_lib.h in user_routines_fast? and are you giving the commands in the while (autonomous_mode) (or whatever it is) loop? I'm not sure what else could be wrong.. sorry :/.

probizzle
02-22-2005, 12:41 AM
Make sure Initialize_Serial_Comms or Serial_Driver_Initialized is called before any printfs...

dunno if that's the error

Mark McLeod
02-22-2005, 03:41 PM
If you are using the printf that came with the new compiler you will need:

#include <stdio.h>

in every file you want to use printfs, such as user_routines_fast.c, or else you will neither compile error, nor any printout.