Quote:
|
Originally Posted by ConKbot of Doom
Ok lets do the math, 1,000,000/(38cycles/sec*3600 seconds/hr)=7.3 hours. not a lot of time.
Once per second gives 277 hours, longer, probably longer than you will need for the robot. But depending on the variable, it could be longer.
How often does the variable change? if it is not that often, you could detect when it changes, and then save it.
|
Good points - it seems to me) that 277 hours is longer than most robots are on, in their lifetimes. Nevertheless, you are right - only writing when you need to is a better solution than writing periodically.
What I had in mind, however, was a variable that is constantly changing (like position, for example), but you don't want to exhaust your EEPROM. So you write only every second. That gives you reasonably up-to-date information, but many fewer write cycles, greatly extending the life of your EEPROM.