Skip to content

Instantly share code, notes, and snippets.

@Gunisalvo
Created August 29, 2015 22:21
Show Gist options
  • Save Gunisalvo/ceeb09ff6828ae10b720 to your computer and use it in GitHub Desktop.
Save Gunisalvo/ceeb09ff6828ae10b720 to your computer and use it in GitHub Desktop.
#include <EEPROM.h>
int acumulador = 0;
static int acumulador2 = 0;
int acumulador3;
int enderecoEEPROM = 0;
void setup() {
Serial.begin(9600);
acumulador3 = EEPROM.read(enderecoEEPROM);
}
void loop() {
Serial.print(acumulador);
Serial.print(" : ");
Serial.print(acumulador2);
Serial.print(" : ");
Serial.println(acumulador3);
acumulador++;
acumulador2++;
acumulador3++;
EEPROM.write(enderecoEEPROM, acumulador3);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment