void writeEEPROM(byte addr, byte toWrite)
{
while(EECR & (1<<EEPE)) ;
EEAR = addr;
EEDR = toWrite;
EECR |= (1<<EEMPE);
EECR |= (1<<EEPE);
}
byte readEEPROM(byte addr)
{
while(EECR & (1<<EEPE));
EEAR = addr;
EECR |= (1<<EERE);
return EEDR;
}