mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
* Deprecate SPIFFS, move examples to LittleFS SPIFFS has been a great filesystem, but it has significant problems in many cases (and it's also pretty slow). Development seems to have slowed/stopped on the upstream version, and we're not able to provide support or fix the known issues with it as-is. Deprecate SPIFFS variable. Update all examples to use LittleFS instead of SPIFFS. Also, minor cleanup on very old examples which has obsolete delays waiting for the Serial port to come up, or which were stuck at 9600 baud because of their ancient AVR heritage. Fixes #7095 * Remove leftover debug code * Clean up comments in some examples * Update documentation on SPIFFS deprecation * Fix host tests to avoid deprecation warnings * Fix cut-n-paste error * Restore SpeedTest.ino, adjust to allow custom FSes Co-authored-by: Develo <deveyes@gmail.com>
41 lines
824 B
C++
41 lines
824 B
C++
/*
|
|
EEPROM Read
|
|
|
|
Reads the value of each byte of the EEPROM and prints it
|
|
to the computer.
|
|
This example code is in the public domain.
|
|
*/
|
|
|
|
#include <EEPROM.h>
|
|
|
|
// start reading from the first byte (address 0) of the EEPROM
|
|
int address = 0;
|
|
byte value;
|
|
|
|
void setup() {
|
|
// initialize serial and wait for port to open:
|
|
Serial.begin(115200);
|
|
EEPROM.begin(512);
|
|
}
|
|
|
|
void loop() {
|
|
// read a byte from the current address of the EEPROM
|
|
value = EEPROM.read(address);
|
|
|
|
Serial.print(address);
|
|
Serial.print("\t");
|
|
Serial.print(value, DEC);
|
|
Serial.println();
|
|
|
|
// advance to the next address of the EEPROM
|
|
address = address + 1;
|
|
|
|
// there are only 512 bytes of EEPROM, from 0 to 511, so if we're
|
|
// on address 512, wrap around to address 0
|
|
if (address == 512) {
|
|
address = 0;
|
|
}
|
|
|
|
delay(500);
|
|
}
|