View Full Version : printf & User_Autonomous_Code
printf()s that take place in user_autonomous_code are not showing up on my terminal emulator. I'm using the dipswitches to force it into autonomous mode.
The code compiles fine with no errors or warnings, and I'm including <stdio.h>
What am I missing?
Kevin Sevcik
20-01-2007, 02:31
Posting your code will help us help you. As it is, we have no idea where your printfs are in your code. If you're calling the printfs in the fast loop instead of the slow loop, then the serial port is getting swamped and isn't having a chance to output the strings.
Ah, sorry, I guess I wasn't clear enough.
I'm calling printf('hello world'); from user_routines_fast.c/User_Autonomous_Code in the 'slow' (26.2ms loop area) loop.
Kevin Watson
20-01-2007, 02:43
Ah, sorry, I guess I wasn't clear enough.
I'm calling printf('hello world'); from user_routines_fast.c/User_Autonomous_Code in the 'slow' (26.2ms loop area) loop.You need to use double quotes.
-Kevin
Ah, my mistake, I am using double quotes. Astronouth just informed me that I need to include the newline or else it won't flush. I'll give that a shot tomorrow.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.