Go Down

Topic: How to reads data(float) from keyboard and write to external EEPROM. (Read 476 times) previous topic - next topic

nacksina


Arduino DUE.

How to reads data(float) from keyboard  and write to external EEPROM.


robtillaart

you need to read digit by digit from the keyboard

to make a float of it you multiply the number you hav by 10 and add the new digit until you encounter a . then you do a similar trick for the decimal part (divide by 10 100 etc)

finally if the number is read completely you save the four bytes that make up the float to EEPROM.

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up