function inclin_calibracao(Porta,incl,ang)

for i=1:10
    fwrite(Porta,[incl,0,0]);
    inclinometro = fread(Porta,4);
    inclin(i,:) = inclinometro(1:2,:)';
end

media_incli(1)=sum(inclin(:,1))/10;
media_incli(2)=sum(inclin(:,2))/10;
file = strcat('incli_',ang,'.txt');
dlmwrite(file,[inclin;media_incli]);
media_incli = dlmread(file)

