Pages: [1]   Go Down
Author Topic: How to reads data(float) from keyboard and write to external EEPROM.  (Read 392 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Arduino DUE.

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

Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: