Добавлена библиотека eeprom

This commit was merged in pull request #5.
This commit is contained in:
klassents committed 2024-10-15 08:54:04 +03:00
1 parent 033aaf9968
commit 1bffc28767
16 files changed
+942 -1

No files matched your search

@@ -0,0 +1,38 @@
/*
* EEPROM Read
*
* Reads the value of each byte of the EEPROM and prints it
* to the computer.
*/
#include <EEPROM.h>
// start reading from the first byte (address 0) of the EEPROM
int address = 0;
byte value;
void setup() {
EEPROM.begin();
// initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
}
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();
address = address + 1;
if (address == EEPROM.length()) {
address = 0;
}
delay(500);
}