#include <EEPROM.h>
int highScore = 0;
void setup() {
Serial.begin(9600);
// Read saved score
highScore = EEPROM.read(0);
int newScore = 150;
if (newScore > highScore) {
highScore = newScore;
EEPROM.write(0, highScore);
}
Serial.print("High Score: ");
Serial.println(highScore);
}
void loop() {}