Solar-Oriented, Arduino-Powered Clock by uhclem
Featured

Step 4: Software - Storing Values

DSC_0024.JPG
DSC_0025.JPG
A number of values in the clock need to be stored in EEPROM. Some, like the display schedule, are fine as bytes. Others, however, need a signed float. The easiest thing to do was store the float as an unsigned 16-bit word of two bytes. All you have to do is move the decimal point with a divide or multiply. I store the sign, where needed, in it's own byte.

I know there are AVR libraries to handle storing whatever to EEPROM. I think I am using less RAM doing it simply the way I do it.
 
Remove these adsRemove these ads by Signing Up
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!