MATLAB Maker Community

Hans Scharler
  • 18 Topics started
  • 42 Replies
3,887 views (last 30 days)

How to Control an Arduino from MATLAB

By Hans Scharler
  • 18 Topics started
  • 42 Replies
on 30 Mar 2018
Latest activity Reply by Madhu Govindarajan
  • 1 Topic started
  • 4 Replies
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  
Madhu Govindarajan
  • 1 Topic started
  • 4 Replies
By Madhu Govindarajan
  • 1 Topic started
  • 4 Replies
on 30 Mar 2018

Links to more advanced stuff would be great :)

 
3 Replies
Reply  
Laith Al-Taie
  • 0 Topics started
  • 1 Reply
By Laith Al-Taie
  • 0 Topics started
  • 1 Reply
on 12 Apr 2018
↪in reply to Madhu Govindarajan
  • 1 Topic started
  • 4 Replies

Like a closed loop control of a stepper motor :)

 
Reply  
Paul Kassebaum
  • 0 Topics started
  • 10 Replies
By Paul Kassebaum
  • 0 Topics started
  • 10 Replies
on 30 Mar 2018
↪in reply to Madhu Govindarajan
  • 1 Topic started
  • 4 Replies

Have heart, getting an LED to blink is not that far from more interesting things, such as this cute blinking heart.

 
Reply  
Hans Scharler
  • 18 Topics started
  • 42 Replies
By Hans Scharler
  • 18 Topics started
  • 42 Replies
on 30 Mar 2018
↪in reply to Madhu Govindarajan
  • 1 Topic started
  • 4 Replies

Do you have any recommendations?

 
1 Reply
Reply  
Madhu Govindarajan
  • 1 Topic started
  • 4 Replies
By Madhu Govindarajan
  • 1 Topic started
  • 4 Replies
on 12 Apr 2018 (Edited)
↪in reply to Hans Scharler
  • 18 Topics started
  • 42 Replies

How about something like this - https://www.youtube.com/watch?v=EJltXLUTFHk

 
Reply  

Related Content

Tags