Skip to main content
Visitor II
June 19, 2024
Question

Not able to print Floating Values using STM8S103F3P.

  • June 19, 2024
  • 1 reply
  • 658 views

I am doing a Current, Voltage Measuring project using INA219 Current Sensor and using STM8S103F3P Mini Development Board. And monitoring the data in Serial Monitor. But I am not able to read/write Floating Values. For Eg: Multimeter is measuring 21.28 mA then I am only getting 21 when I use int or long int. And if I use float then random symbols like "????" occurs in serial monitor.
What can I do to print floating values or how can I print values more precisely? 

    This topic has been closed for replies.

    1 reply

    Graduate II
    June 19, 2024

    Floating point needs lot of flash and you need to explicit enable it and link with additional libraries. Rad the docu of your compiler setup.