AnsweredAssumed Answered

How to convert from ASCII chain to a float variable

Question asked by Pablo Suarez on Jul 18, 2013
Latest reply on May 12, 2014 by TomE

HI there, I'm working in a logger system that send logged data to a PC. By now I'm developing the PC Software in C# with a lot of very usefull tools that allow me to change from Hexa to Float, Flota to Hexa, to String... what I want, but I know when I want to develope in Visual4Android I will not be so lucky.

So, someone knows how can I convert ASCII data string (4 bytes received by serial SPI) in to a float data? In other words the opposite of sprintf.

Mi idea is send a float data converted by sprinf in ASCII string and reseive float configuration data also in ASCII strings.

I'm using the MCF51CN128 ColdFire.

 

Thank you for your time!

Regards!

 

 

Pablo, from Buenos Aires.

 

Outcomes