-
-
Save GiovanniBalestrieri/85e010a07675d86cb30b to your computer and use it in GitHub Desktop.
Snippet 4 - Rolling Plot Matlab Arduino Gyroscope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Save angular rates from the received CSV string | |
C = textscan(sentence,'%c %d %d %d %c','delimiter',','); | |
Wx = C{2}; | |
% update the buffer | |
gxdata = [ gxdata(2:end) ; Wx ]; | |
% Plot, anzi subPlot! | |
subplot(3,1,1); | |
title('X Axis Omega in deg/s'); | |
plot(index,gxdata,'r','LineWidth',2);%,'MarkerEdgeColor','k','MarkerFaceColor','g','MarkerSize',5); | |
xlabel('Sample'); | |
ylabel('Wx (deg/sec)'); | |
drawnow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment