Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * 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()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- Serial.print("checksum: ");
- Serial.println(check_eeprom());
- delay(500);
- }
- int check_eeprom() {
- int checksum = 0;
- for(int i=0; i<512;i++) {
- value = EEPROM.read(address);
- checksum+=value;
- }
- return checksum;
- }
Advertisement
Add Comment
Please, Sign In to add comment