only getting value 255 from EEPROM

UKHeliBob:
You could, of course, just have divided the value by 4

outputValue /= 4;

Either way you have reduced the resolution of the measurement and, as previously pointed out, you could have used the put() and get() functions to save and read an int value if maintaining the resolution were important.

I get your point but in this case the value wasn't important (this is an exercise for me cause im doing my internship here). Still thanks keeping this in mind when the value is inportant. thx for the reaction and tips, appreciate your help.