EEPROM.update

From Gamebuino Wiki
Jump to: navigation, search

Description

Write the value corresponding to the address. This function clear the current value

Syntax

EEPROM.update(address, value);

Parameters

  • address: the location to read from, starting from 0 (int)
  • value: the value to write, from 0 to 255 (byte)

Returns

none

Example

 #include <EEPROM.h>
 #include <SPI.h>
 #include <Gamebuino.h>
 
 Gamebuino gb;
 
 byte levels_unlocked = 0;
 
 void setup()
 {
   gb.begin();
   gb.titleScreen(F("Read EEPROM"));
   EEPROM.update(0, levels_unlocked);
 }

See also