Help with Storing int values when powered down

Im very new to arduino and im currently working on a project in which i use a button to decrease an int value.

i want the integer value to remain the same when the arduino is turned off and then on again but i cant figure out how to do so

any help would be appreciated

Just to clarify, i want the int value to remain the updated value when power is disconnected, not the original

You can store them in the chip:
https://www.tutorialclues.com/topics/arduino/examples/store-a-variable-in-eeprom-and-then-retrieve-it-and-print-to-screen

Welcome to the forum.

If you have an Arduino Uno then you can store the value in EEPROM and read it at startup.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.