Difference between revisions of "EEPROM.update"

From Gamebuino Wiki
Jump to: navigation, search
(Create the page)
 
m (Fix a minor bug)
 
Line 33: Line 33:
 
== See also ==
 
== See also ==
 
* [[EEPROM.read]]
 
* [[EEPROM.read]]
* [[EEPROM.update]]
+
* [[EEPROM.write]]
 
* [[EEPROM.put]]
 
* [[EEPROM.put]]
 
* [[EEPROM.get]]
 
* [[EEPROM.get]]

Latest revision as of 2016-11-27T00:45:07

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