function clock_callback(H, offset_1, offset_3, factorLon, factorLat, msg_box)

        
        servo(1:3) = ler_pos(H,1,offset_1);
        servo(4:6) = ler_pos(H,3,offset_3);
        perna = deg2rad(round(servo(1:4)));

    %     Ai = CinDir4dof(perna, defs.L, XYZRef);
    %     [P, C, F, E] = CoordJuntas(Ai, XYZRef, defs.L, defs.O);
    %     DesenharRoboPZ(P, C, F, E, hg)

        teta = ler_inclinometro(H,3,factorLon);
        tronco_long = pi/2-((pi/2-perna(2))+perna(3)-perna(4));
        beta = teta - (tronco_long);

        teta = ler_inclinometro(H,1,factorLat);
        zeta = teta; % - (pi/2-((pi/2-perna(2))+perna(3)+perna(4)));

        set(h(1), 'string', ['Tronco = ', num2str(round(rad2deg(tronco_long)))]);
        set(h(2), 'string', ['longitudinal =' num2str(round(rad2deg(beta)))]);
        set(h(3), 'string', ['lateral =' num2str(round(rad2deg(zeta)))]);
        axis off
        
        axis([-10 20 -10 20])
       
%         if(get(f_sim, 'currentCharacter') == 's')
%             clock = timerfindall;
%             stop(clock);
%             delete(clock);
%         end

% FIM
        