diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2007-10-06 13:04:46 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2007-10-06 13:04:46 +0000 |
commit | 9e48dfc4fd53a2bc53367568077fbea44f88eda2 (patch) | |
tree | 356854e8239e0f0676bcf6105b7ea6a53cb9a880 /libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde | |
parent | 179fcdbda432ff33a921a70994087b08b2a79caa (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.pde | 21 |
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() +{ +} |