Servo Motor Control using MATLAB




In this tutorial you will learn to make direct connection between your Arduino and Matlab, so that you can program your Arduino directly through Matlab. It is very useful when you are working on complex robotics like Robotic Hand, Humanoid etc. as you can process your complex program on your PC in Matlab and then directly program the results in Arduino.

Servo-Control-with-MATLAB







So let’s get started:

First of all you have to download Arduino support package from Matlab. You can download it by using following link:

http://in.mathworks.com/hardware-support/arduino-matlab.html

matlab1

It will download a compressed file, so first of all uncompressed it and save it in the folder and name the folder ArduinoIO. Now open the Arduino IDE, I am using Arduino 1.0.6, click on the file menu and then open the ArduinoIO folder and select the .pde file of your interest from the Pde folder. I selected adioes.pde as it allows us to control servo motors. You may select other programs according to your choice. You may learn about various pde file by just opening it in Arduino IDE.

Now the final step will be to upload the program adioes.pde on your Arduino and now we will move on to Matlab.

I will try to teach you about Matlab code using picture so that it can be easy in understanding.

The most important thing is to select the ArduinoIO folder as your current folder in Matlab. You can do it by clicking on ‘browse the folder’.

Now after your current folder is selected, you can click on arduino.m to get all the function and commands which you can use. You can see that, first command is arduino(comport).

Read More:  Servo Motor Control using MATLAB




Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Magnetic-Field-Measurement
Magnetic Field Strength Measurement using Arduino

In this project we are using the concept of ADC (Analog to Digital Conversion) in ARDUINO UNO. We are going to...

Close
Scroll to top