cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to print Floating Values using STM8S103F3P.

Prasad_2001
Associate II

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? 

1 REPLY 1
Uwe Bonnes
Principal III

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.