Hi,
I am using a Teensy3.0 and wanting to save some configurations to EEPROM. I am using teensyduino1.14 and arduino-1.0.3. I have read about EEPROM erasure after sketch upload but I see it also after reset.
The delay(10000) is simply time for me to start the serial monitor but the result is the same for upload and reset.
the Output is always:
ÿ
A
the second time it is run and after a reset rather than a upload, i would have expected:
A
A
Any help would great... thanks.
I am using a Teensy3.0 and wanting to save some configurations to EEPROM. I am using teensyduino1.14 and arduino-1.0.3. I have read about EEPROM erasure after sketch upload but I see it also after reset.
The delay(10000) is simply time for me to start the serial monitor but the result is the same for upload and reset.
the Output is always:
ÿ
A
the second time it is run and after a reset rather than a upload, i would have expected:
A
A
Any help would great... thanks.
Code:
#include <Arduino.h>
#include <EEPROM.h>
void setup()
{
Serial.begin(9600);
}
void loop()
{
char character;
delay(10000);
character=EEPROM.read(0);
Serial.println(character);
EEPROM.write(0,'A');
character=EEPROM.read(0);
Serial.println(character);
while(1);
}