Lab Notebook‎ > ‎Scooter Computer‎ > ‎

Printing Floating Point Numbers

We need to do a lot of floating point calculations and in development printout values to the screen. This needs a little tweaking on the AVR-MT-128 to work...

Using sprintf function for float numbers in AVR-GCC

Short version for WinAVR:

  1. Add Libraries "libprintf_flt.a" and "libm.a" under Project -> Configuration Options -> Libraries
  2. Add to [Linker Options] "-Wl,-u,vfprintf" under Project -> Configuration Options -> Custom Options
Comments