Ok, maybe its wrong to use int and i read your post about basic serial inputs but i dont understand what I could replace it with. Is example 6 the wright one to use in my case?
I also have another question: Is it correct to use eeprom.write() to store a number permanently, when the arduino has no power?