MATLAB Maker Community

3,383 views (last 30 days)

How to Control an Arduino from MATLAB

By Hans Scharler on 30 Mar 2018
Latest activity Reply by Laith Al-Taie on 12 Apr 2018

I found a quick tutorial on how to Interface an Arduino with MATLAB.

The tutorial shows how to blink an LED from MATLAB.

Here's what the code looks like:

% create an Arduino object
a = arduino('com3', 'uno');     
% start the loop to blink led for 10 seconds
for i = 1:10
    writeDigitalPin(a, 'D11', 1);
    pause(0.5);
    writeDigitalPin(a, 'D11', 0);
    pause(0.5);
end
% end communication with Arduino
clear a
Reply  
By Madhu Govindarajan on 30 Mar 2018

Links to more advanced stuff would be great :)

 
Reply  

Related Content

Tags