clc
globalVar;
best=0.1;
worst=0;
for i=0:10000
    tic;
    fwrite(H,[128 229 0 0 155 0 0],'uint8');
    [rxmessage,count]=fread(H,7,'uint8');
    time=toc;
    if(count~=7)
        disp('erro')
    end
    if(time>worst)
       worst=time; 
    end
    if(time<best)
       best=time;
    end
end
best
worst