The big error you are making is that you are assuming, I think, that the deceleration of global variables like the ones shown here:-
Are made after the setup function has run, they are not.
That is why declaration of global variables are normally placed before any function in the code. Global variables are always supplied an initial value of 0, and are integer types. So you need to store / retrieve them from two bytes and join them up. However, if you want the EEPROM library to do this for you then look at the other functions this library offers in the reference section of the Arduino documentation.
Writing this - are you assume that every time that the pixelTrimmed value has changed, the value of rightWall will automatically updated from pixelTrimmed ?
Only with this assumption you can expect, that your code will work correct.
Int pixelTrimmer = EEPROM.read(2);
Void setup(){
}
I've taken pixelTrimmer out of setup. and you are right, the animation appears. but maybe the error is in the function logic. The value on the EEPROM is 28, but on the serial monitor, the end of the ball variable animation reaches 36.
I don't see what that has to do with anything.
Sure the value will change but as you never write anything back to the EEPROM the change will not register.
Have you seen the documentation I told you about?
Here is the link to it