Skip to content

Instantly share code, notes, and snippets.

@ariejan
Created August 4, 2014 14:44
Show Gist options
  • Save ariejan/3cd2986afb67e054ba46 to your computer and use it in GitHub Desktop.
Save ariejan/3cd2986afb67e054ba46 to your computer and use it in GitHub Desktop.
[env:arduino_mega]
platform = atmelavr
framework = arduino
board = megaatmega2560
#include <Arduino.h>
#include <EEPROM.h>
int address = 0;
byte value;
void setup() {
Serial.begin(9600);
while (!Serial) {
; // Wait for serial port to connect
}
}
void loop() {
value = EEPROM.read(address);
Serial.print(address);
Serial.print(\t);
Serial.print(value, DEC);
Serial.println();
address = address + 1;
if (address == 512) {
address = 0;
}
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment