5 Replies Latest reply on Oct 20, 2016 12:35 AM by JoMe_264151

    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.

          float myFloat = 784.4564549;     
      int bytesWritten;     
      char myString[50];     
      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 :)