I'm using CY8CKIT-050 PSOC 5LP development kit and I have this code:
#include "project.h"
#include<stdio.h>
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
float32 test;
LCD_Start();
for(;;)
{
test = 0.1;
sprintf(lineStr, "Test: %.2f", test);
LCD_Position(1u, 0u);
LCD_PrintString(" ");
LCD_Position(1u, 0u);
LCD_PrintString(lineStr);
}
But when I connect the LCD to the board, it doesn't appear 0.1, but 0.. However, when test=0.0, it apears Test: 0.000000.
I hope someone can help me. Thank you for your responses.
Test:appears, but I thought it was so obvious that I didn't have to mention. It's displayedTest: 0.– Josemi Apr 08 '19 at 14:56sprintf(lineStr, "Test: %.2f", 0.1);? – jsotola Apr 08 '19 at 15:09