How to display the float value in Cube IDE .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-28 10:20 AM
I am using Sprintf, but I cant see the number in UART
LPS22HH_pressure=LPS22HH_GetPressure();
sprintf(result,"%4.2f", LPS22HH_pressure); // @suppress("Float formatting support")
I have also tried %g
Solved! Go to Solution.
- Labels:
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-28 11:37 AM
Enable float support for printf in project settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-28 11:37 AM
Enable float support for printf in project settings.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-15 2:14 AM
i enabled this but all 000 got printed after decimal point
what should i do
