aboutsummaryrefslogtreecommitdiff
path: root/libraries/EEPROM/examples/eeprom_clear
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_clear')
-rw-r--r--libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde21
1 files changed, 21 insertions, 0 deletions
diff --git a/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde
new file mode 100644
index 0000000..36af68e
--- /dev/null
+++ b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde
@@ -0,0 +1,21 @@
+/*
+ * EEPROM Clear
+ *
+ * Sets all of the bytes of the EEPROM to 0.
+ */
+
+#include <EEPROM.h>
+
+void setup()
+{
+ // 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);
+}
+
+void loop()
+{
+}