Skip to content

Instantly share code, notes, and snippets.

@GiovanniBalestrieri
Created July 28, 2015 00:11
Show Gist options
  • Save GiovanniBalestrieri/ccad377e16a08ee6b1a1 to your computer and use it in GitHub Desktop.
Save GiovanniBalestrieri/ccad377e16a08ee6b1a1 to your computer and use it in GitHub Desktop.
Snippet 2 - Matlab Arduino Serial communication
fprintf(xbee,'T');
disp('Sent: T');
pause(1);
ack = fscanf( xbee, '%s');
if (strcmp(deblank(ack), 'Ok') == 1)
disp ('Received: OK');
end
fprintf(xbee,'M');
disp ('Sent: M');
ack = fscanf( xbee, '%s');
disp('Received:');
disp(ack);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment