help with EEPROM

I am using an Arduino Uno from Elegoo this is my first time using an Arduino for a project and my first time coding in the Arduino language.

I am trying to store the temperature outside and every hour compare it to the temperature an hour before and turn the continuous servo for the time equal to the difference between the temps, turning CCW or CW depending on if the temperature increased or decreased from 1 hour before. I have all this working but my current problem is that overnight, the power will be off (it’s solar-powered) but as we all know temperature can change a lot overnight, but with my current code it will wake up and stay at the current temperature and the motor’s position will be off by however much the temperature changed overnight. I have already did the math and the EEPROM will last long enough at this rate.

After a bit of research, I remembered that the Arduino Uno has some onboard EEPROM.

My new idea is that every hour when it gets the temperature outside it will (along with turning the motor) right the current temperature to the EEPROM and read the temperature from an hour ago from the EEPROM after finding the difference, something like this

#include <Servo.h>

int Old = 0;

int New = 0;

int Time = 0;

int DIfference = 0;

Servo servo_9;

void setup()
{
pinMode(A2, INPUT);
Serial.begin(9600);

servo_9.attach(9);

}

void loop()
{
delay(2000); // Wait for 2000 millisecond(s)
// Read EEPROM, set var Old to that
DIfference = abs((analogRead(A2) - Old));
// Write EEPROM new temperature
New = analogRead(A2);

if (New < Old) {
Serial.print(Time);
Serial.print(" Old was “);
Serial.print(Old);
Serial.print(”, New was “);
Serial.print(New);
Serial.print(”, the difference was “);
Serial.println(DIfference);
servo_9.write(180);
delay(DIfference); // Wait for DIfference millisecond(s)
servo_9.write(90);
Time += 1;
}
if (New > Old) {
Serial.print(Time);
Serial.print(” Old was “);
Serial.print(Old);
Serial.print(”, New was “);
Serial.print(New);
Serial.print(”, the difference was ");
Serial.println(DIfference);
servo_9.write(0);
delay(DIfference); // Wait for DIfference millisecond(s)
servo_9.write(90);
Time += 1;
}
}

My problem now is I don’t know how to use the EEPROM and would be very grateful if anyone could help me figure it out!
Thanks!

(deleted)

Did you look here?