aboutsummaryrefslogtreecommitdiff
path: root/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2007-10-06 13:04:46 +0000
committerDavid A. Mellis <d.mellis@arduino.cc>2007-10-06 13:04:46 +0000
commit9e48dfc4fd53a2bc53367568077fbea44f88eda2 (patch)
tree356854e8239e0f0676bcf6105b7ea6a53cb9a880 /libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde
parent179fcdbda432ff33a921a70994087b08b2a79caa (diff)
Moving libraries out from inside targets and creating bootloaders directory.
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde')
-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()
+{
+}