mirror of
				https://github.com/esp8266/Arduino.git
				synced 2025-10-31 15:50:55 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			400 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			400 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * 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()
 | |
| {
 | |
|   EEPROM.begin(512);
 | |
|   // 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
 | |
|   pinMode(13, OUTPUT);
 | |
|   digitalWrite(13, HIGH);
 | |
|   EEPROM.end();
 | |
| }
 | |
| 
 | |
| void loop()
 | |
| {
 | |
| }
 |