Demo entry 6720409

cvvb

   

Submitted by fchg on Mar 16, 2018 at 12:05
Language: Matlab. Code size: 313 Bytes.

while(1)
    
    d=ee405;		% get sensor data from ee405 board
    mag=d.mag-mconst;
    a= atan2(mag(2),mag(1));
    R=[cos(a) -sin(a);sin(a) cos(a)];
    np=R*[nx;ny];
    set(northh,'XData',np(1,:),'YData',np(2,:))
    set(southh,'XData',-np(1,:),'YData',-np(2,:))
    drawnow;
    pause(0.015);
end

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).