this is my very first instructables and I was referred by an old member. Follow her link here: (http://www.instructables.com/member/Analogue-Chick/

Its a simple illustration on how we can connect Arduino to Matlab and actually control and get information on Arduino
using Matlab

I have seen few tutorials regarding how to control or get data from Arduino using Matlab. Matlab is a very powerful tool for student and engineers a like. That's why i want to create this tutorial as a start for those, like me want to explore the 2 powerful tools in engineering and techs.

It's a rough start for me since this is my first post in instructables.... feel free to comment so i can improve it thanks!

here's the vid for the demo:

Step 1: Step 1: Things you need to know

In this tutorial you need to know the following:
1. Matlab and creating M-file and GUI (there are tons of tutorials online)
2. Arduino and Arduino programming
3. Arduino Support with Matlab
        tutorials from Giampiero Campa

<p>I am trying download the code but I don&acute;t can. please you can help me?</p>
<p>Please can you show code of matlab GUI</p>
<p>Very good tutorial, but I've tried many times, always just an error message like this below, can you help me? please<br><br> Error in gui_mainfcn (line 95)<br> feval (varargin {:});<br><br> Error in yes (line 16)<br> gui_mainfcn (gui_State, varargin {:});<br><br> Error in @ (hObject, eventdata) yes ('pbOn_Callback', hObject, eventdata, guidata (hObject))</p>
<p>How can I connect BCILAB 1.1 output from MATLAB 2013b to arduino and then using it cntrolling servomotor? The picture depicted is dynamic graphical output of MATLAB .I want to use it control the servo motor.</p>
<p>how can we use serial commands in matlab to transmit data from tx and rx pin of arduino?</p>
<p>1. try to get the com port of your arduino</p><p>2. access the communication by accessing &gt;&gt;a = serial('COM1') --&gt;&gt; this is an example</p><p>3. then to open the communication &gt;&gt;fopen(a)</p><p>to access data (receive data) from the arduino &gt;&gt;fscanf(a)</p><p>4. to send data (transmit data) to the arduino &gt;&gt; fprintf(a,'your value here')</p>
<p>Hi, sorry for may late reply. you can download the codes here. the codes are:</p><p>yes.fig.txt</p><p>yes.m.txt</p><p>just change the filename and remove the .txt extenstion</p>
<p>Can you pass me the code please? my email is alejandro.leon1894@gmail.com</p>
<p>Good!where is the code ?</p>
<p>the yes.m.txt and yes.fig.tx if the file. download it and change the filename to:</p><p>yes.m</p><p>yes.fig</p><p>put it on documents\matlab folder</p>
<p>great! can you borrow me the program code please?</p>
<p>i cant download the files</p>
<p>try to change the txt file that you download here</p>
<p>Thanks bro!</p><p>in my project i've building a Matlab GUI plotting real time data from arduino. But when I try to read two or more analog ports at the same time theres a error messege about the COM port. Do you know how I fix it?</p>
<p>can you send the codes ill try to look at it. thanks!</p>
<p>Send me your email for I send you the codes. Thank you</p>
<p>Great Job!!</p><p>I'm making a project that i'm using the arduino and matlab.</p><p>Can you send me the m.file and figure?</p><p>Thanks</p>
Welcome to Instructables! :D
Thanks ma aiz
cool, great idea!

About This Instructable


50 favorites


Bio: the simpler, the better!!
More by rmagtibay: Arduino Based Automated Lighting Control Arduino I/O-Matlab basic tutorial
Add instructable to: