Society of Robots - Robot Forum

Software => Software => Topic started by: axonuser on May 22, 2009, 02:07:39 PM

Title: Cant get any output with printf() on the axon with default program axon.c
Post by: axonuser on May 22, 2009, 02:07:39 PM
I am new to this forum. Can someone please help.

I try to use the axon microcontroller and basically use the trigonometric functions sin, cos, tan etc. I have the #include <math.h> in the SoR_Utils.h header by default and the #include "libm.a" is commented out by default. stdio.h is included by default also in the header of SoR_Utils.h.  The -lm option is added by default in the makefile also.  

My problem is that a compilation of the code yields no errors and no warnings, however an attempt to print results with an instruction like

printf(\"C sine 30 %f cosine 30 %f tangent 30 %f\\r\\n\", sin(30), cos(30), tan(30));

yields no output.  The library function rprintf() works when I use the library function SoR_Sin() SoR_Cos, SoR_tan() etc,  but printf does not yield any output.  I am not sure at this time what I could be doing wrong or what else I need to do.
Title: Re: Cant get any output with printf() on the axon with default program axon.c
Post by: billhowl on May 22, 2009, 10:42:24 PM
printf() is a console command it Writes to the standard output (stdout), Axon did not have any console to display the results.
You have to use the rprintf() to display your via serial term.