Добавлена библиотека eeprom
This commit was merged in pull request #5.
This commit is contained in:
1 parent
033aaf9968
commit
1bffc28767
16 files changed
+942
-1
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* EEPROM Clear
|
||||
*
|
||||
* Sets all of the bytes of the EEPROM to 0.
|
||||
* Please see eeprom_iteration for a more in depth
|
||||
* look at how to traverse the EEPROM.
|
||||
*
|
||||
* This example code is in the public domain.
|
||||
*/
|
||||
|
||||
#include <EEPROM.h>
|
||||
|
||||
void setup() {
|
||||
// initialize the LED pin as an output.
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
EEPROM.begin();
|
||||
|
||||
/***
|
||||
Iterate through each byte of the EEPROM storage.
|
||||
***/
|
||||
|
||||
for (int i = 0 ; i < EEPROM.length() ; i++) {
|
||||
EEPROM.write(i, 0);
|
||||
}
|
||||
|
||||
// turn the LED on when we're done
|
||||
digitalWrite(LED_BUILTIN, HIGH);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
/** Empty loop. **/
|
||||
}
|
||||
Reference in new issue
Block a user