nvram integer limitations
-
I've been storing epoch time stamps in nvram for some VIP events
>>> import pycom; pycom.nvs_set('VIP', 1591319102); print(pycom.nvs_get('VIP')) 1591319102But a typo has just shown me that this is only going to work till Jan 19 2038
>>> import pycom; pycom.nvs_set('VIP', 2147483649); print(pycom.nvs_get('VIP')) -2147483647I'm such a sloppy programmer!
-
@kjm said in nvram integer limitations:
1591319102); print(pycom.nvs_get('VIP'))
Yes, NVRam only fits 32bit integers (signed). 2,147,483,647 is the maximum value you can fit in!
Of course you can create your own workaround to use multiple keys.Gijs
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login