Pages: [1]   Go Down
Author Topic: Matlab>>>Arduino  (Read 3506 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm currently doing project to control a robotic car , but i need build a Matlab GUI to control the car through my laptop, so how i can interface Matlab with the Arduino to control the motor? i use 2 DC motor which is connect with H-bridge L293D, i can control the motor by using Arduino, but i have no ideal to interface the Arduino with the Matlab GUI, is any example or useful guide for me to interface both of them ???
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 651
Posts: 50845
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but i need build a Matlab GUI to control the car through my laptop
Why Matlab? Matlab is a very expensive program to use for this task, unless there are requirements that you have not revealed.

http://arduino.cc/playground/Interfacing/Matlab
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yup, this is one of the my project requirement..., i follow the guide from there, but it shows this :
a=arduino('port')
??? Undefined function or method 'arduino' for input arguments of type 'char'.


i'm missing some step????
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 651
Posts: 50845
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is a link on the playground page to a mathworks site. It would appear that other people have been able to get all the required software installed so that MATLAB can talk to the Arduino. You should be able to, too.

There appears to be a fair amount of information available on the mathworks site, with examples, even.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, but the fact is that. The appearing error is that... and I don't know why...
I have installed correctly:
- MATLAB R2010a, 32bit
- FTDI driver to communicate with the arduino MEGA
- Configured the correct COM port

... and the arduino GUI works perfectly, and communicate correctly with the MEGA.

In MATLAB, the commandline I have wroten is:
ArduinoObj=arduino(ComPort);
while ComPort is a valid string with the content of "COM7", which are the actual com port to communicate with the arduino, via ArduinoGUI.

Can you help me, please?
Thank you very very much!
StickFix
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok. The answer is simple.
Thanks to the MATLAB webpage for saying nothing about how to install arduino into MATLAB (such as a plugin).

Watch this video (in spanish) or others in english.
https://www.youtube.com/watch?v=TitVKsC9tX0

Tanks!
Logged

Santiago de Chile
Offline Offline
Sr. Member
****
Karma: 13
Posts: 481
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would not install the Arduino plug-in.

Instead I would use the communication toolbox and use the serial rs232 protocol to comunicate the GUI with Arduino.
You can configure the baudrate, the port COM and the parity, number of stop bits, etc...
Logged

Work for what you love

Pages: [1]   Go Up
Jump to: