mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
EEPROM examples
This commit is contained in:
25
libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino
Normal file
25
libraries/EEPROM/examples/eeprom_clear/eeprom_clear.ino
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* EEPROM Clear
|
||||
*
|
||||
* Sets all of the bytes of the EEPROM to 0.
|
||||
* This example code is in the public domain.
|
||||
|
||||
*/
|
||||
|
||||
#include <EEPROM.h>
|
||||
|
||||
void setup()
|
||||
{
|
||||
EEPROM.begin(512);
|
||||
// write a 0 to all 512 bytes of the EEPROM
|
||||
for (int i = 0; i < 512; i++)
|
||||
EEPROM.write(i, 0);
|
||||
|
||||
// turn the LED on when we're done
|
||||
digitalWrite(13, HIGH);
|
||||
EEPROM.end();
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user