Monday, December 28, 2015

From Arduino to MATLAB


EMG signals acquired by the SpikerShield and Arduino Uno can be send to the Macbook Air through serial port (USB). The current problem is how can we read and even display the data from MATLAB. After trying a few possible solutions from the internet. There are two working solutions you can base on for your next-step development:
  1. Serial Monitor (Debugger): It can be downloaded from http://www.mathworks.com/matlabcentral/fileexchange/45839-serial-monitor--debugger-. It is an app that you can install, and then run it by clicking the APPS tab -> MY APPS -> Serial_Monitor. It will show the serial data in a pop-up window. You can save the data to the "SerialData" variable for further processing.
  2. Real Time Serial Data Logger: It's a piece of code that you can run in the MATLAB. It can be copied from https://billwaa.wordpress.com/2013/07/10/matlab-real-time-serial-data-logger/. You can just copy and paste it into the MATLAB, and a pop-up Serial Data Log window will appear to show the plotted serial data.
The followings are the screen shots and videos of these two solutions in action.

Serial Monitor (Debugger)
 

Serial Data Logger
 

 

No comments:

Post a Comment