memory help

How to keep the number larger than 255 in memory. I searched in the forum, I could not find everybody wrote something but no definite answer.

arduino promini 328p

EEPROM.write(0, toplam);

    int val = digitalRead(0) / 4;
    

    addr = addr + 1;
    if (addr == EEPROM.length()) {
    addr = 0;
   }

Use the EEPROM “put” and “get” methods.

I don't know how to use it. my codes above can you please help

cenkgursu:
can you please help

Sure

A byte is 8 bits and covers the range 0-255. A memory location in Eeprom contains only one byte .

Luckily the eeprom library has simple commands to enable you to store an integer ( which is made up of two bytes) in sequential eeprom locations .

The links provided by the last poster shows the commands , google will find you examples or could look at splitting an integer into two bytes yourself and then saving them