Author Topic: Cant get any output with printf() on the axon with default program axon.c  (Read 1987 times)

0 Members and 1 Guest are viewing this topic.

Offline axonuserTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
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.
« Last Edit: May 22, 2009, 02:22:14 PM by axonuser »

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 375
  • Helpful? 32
  • Your success is in your hands.
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.


« Last Edit: May 25, 2009, 10:35:59 PM by billhowl »

 


Get Your Ad Here