#include <EEPROM.h>
float x = 0 ;
void setup() {
Serial.begin(9600);
x = EEPROM.read(0);
Serial.println("Writing...");
if(x == 255){
x = 12.3695;
EEPROM.put(0, x);// บันทึกค่าตัวแปร
Serial.println("Write Value OK!");
}
Serial.println("Reading...");
Serial.println(EEPROM.get(0, x),4);
}
void loop() {
}