From fc944ff979dbbd49a57722fe2d1d2acf47312eb4 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 20 Oct 2011 22:16:19 -0700 Subject: Inital commit... halfway through the project --- .../EEPROM/examples/eeprom_clear/eeprom_clear.pde | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde (limited to 'libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde') 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 + +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() +{ +} -- cgit v1.2.3