diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-10-20 22:16:19 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2011-10-20 22:16:19 -0700 |
commit | fc944ff979dbbd49a57722fe2d1d2acf47312eb4 (patch) | |
tree | 38cc3a5c5c8f24f55068fc4ffa73d018169fc2df /libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde |
Inital commit... halfway through the project
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde')
-rw-r--r-- | libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde | 23 |
1 files changed, 23 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..6fd2041 --- /dev/null +++ b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde @@ -0,0 +1,23 @@ +/*
+ * 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()
+{
+ // 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()
+{
+}
|