How do I store two differents variables to Arduino EEPROM from PC trough serial communication with Visual C#? I have tried with this Arduino code but it doesn't work. Can someone help me?
#include <EEPROM.h>
const byte chipSelect = 4;
int setDelay, setColors;
void setup()
{
Serial.begin(115200);
setDelay = EEPROM.read(0);
setDelay = setDelay * 1000;
setColors = EEPROM.read(1);
}
void loop()
{
Serial.begin(115200);
if (Serial.available() >1){
int value = Serial.read();
int value2 = Serial.read();
EEPROM.write (0, value);
EEPROM.write (1, value2);
setDelay = EEPROM.read(0);
setDelay = setDelay * 1000;
setColors = EEPROM.read(1);
Serial.println("setDelay");
Serial.println("setColors");
}
}