Integer/Float over UART | Cypress Semiconductor
Integer/Float over UART
i think this is a noob question here, but anyway. My application involves interfacing an ADXL345 with the PSOC4 BLE, over SPI, and communicating the data to the computer serially via UART.
However, im unale to send the integer data over UART. Here's a short code that im trying to run :
the idea is to print "784.4564549" onto my serial monitor.
bytesWritten = sprintf(myString, "%f", myFloat);
However, all that the serial monitor prints is a dash!
Any suggestions on how else to send an integer over UART? thanks :)