is anyone tried to write or read from Gr-Kaede EEPROM, i am facing some problem in that, please suggest..
I am writing single byte and reading back, code work fine just after dump, now if i disconnect and connect board code is not working as intended,
it stucked somewhere in EEPROM.write() routine. Please find the code and output log below -
Sketch/Code :
#include <Arduino.h>#include "HardwareSerial.h"#include "EEPROM.h"void setup(){ unsigned char WriteByte=25,ReadByte=0; pinMode(PIN_LED0,OUTPUT); Serial.begin(9600); delay(1000); Serial.println("Writing..."); EEPROM.write(0,WriteByte); delay(500); Serial.print("you wrote : "); Serial.println(WriteByte); Serial.println("Reading..."); ReadByte = EEPROM.read(0); delay(500); Serial.print("you read :"); Serial.println(ReadByte); digitalWrite(PIN_LED0, 1);}void loop(){ //do nothing}
Output/Log :
a.)Just after code dump in the board -
Writing...you wrote : 25Reading...you read :25
b.) After disconnect and reconnect board (Power off-on) :
Writing...
waiting for reply.... !!!
I'm so sorry. The issue also occur on our side. I will investigate by this week.
Hi, sorry to reply delay.
You can avoid this issue by adding interrupts() after EEPROM.write as below. I don't understand the cause. I'm investing now..
#include <Arduino.h>
#include "EEPROM.h"
void setup()
{
unsigned char WriteByte = 25, ReadByte = 0;
pinMode(PIN_LED0, OUTPUT);
Serial.begin(9600);
delay(1000);
Serial.println("Writing...");
EEPROM.write(0, WriteByte);
interrupts();// added
delay(500);
Serial.print("you wrote : ");
Serial.println(WriteByte);
Serial.println("Reading...");
ReadByte = EEPROM.read(0);
Serial.print("you read :");
Serial.println(ReadByte);
digitalWrite(PIN_LED0, 1);
}
void loop()
//do nothing
hello Okamiya Yuuki, thanks for your reply.
I tried with above solution but still facing the same problem.
I'm sorry delay, still under investigation.
I found where the error occur in library, but did not find why so.
I have solved it, sorry to delay.
I will update library version to V1.16 by tomorrow.