%Read EEPROM
%
%Read one byte from the EEPROM.
%
%Readable addresses are 0..0xFF. Addresses >0x2C always read as
%0x00. Known EEPROM addresses are tabulated below.

function return1=readEeprom(H,addr)

globalVar;
servoReturn2 = 3;   %valor que se espera obter do servo nesta operação

command = READ_EEPROM;
param1 = addr;
param2 = 0;
checksum = 256 - mod((STARTBYTE+command+param1+param2),256);

sendMessage(H,command,param1,param2,checksum);
[return1,return2]=readMessage(H);

if(servoReturn2 ~= return2)
    err=ERR_READ_EEPROM;
    errfcn(H,err);
end
