Arduino and MatLab

Arduino has always been linked to some programming enviroments (like Processing, Pure Data, VVVV, Max/Msp to name some of them) but since it has fast become a quick & easy way to make your project get in touch with the physical world, many different solutions are there for people who is working with other, not-only-performative programs.
[Matlab] (high-level programming tool for technical and mathematial computation) has *probably* different ways to receive data from the Arduino. I found a well and detailed step-by-step guide with codes and pictures on this presentation from Giampiero Campa who lead the webinar “Learning Basic Mechatronics Concepts Using the Arduino Board and MATLAB“:
The webinar introduces the ArduinoIO package, which allows the user to perform Analog and Digital Input and Output, as well as to control DC, Servo and Stepper Motors interactively from the MATLAB command window, without having to write, debug, compile, upload and run C programs.
you can downlaod the Arduino package from here.
Any tester?
via [MathWorks.cn]
September 20th, 2010 at 00:34:04
That’s an excellent option, I’ve used it and it works great: http://www.youtube.com/watch?v=0nKerK87IEM
September 20th, 2010 at 01:01:46
arduinoteam do you mean MATLAB?
September 20th, 2010 at 10:01:43
arduinoteam MATLAB not MathLab 😉
September 20th, 2010 at 11:01:32
thanks. 😉
September 21st, 2010 at 13:37:48
I would be glad to test the program. I work with the lab that supports first year engineering at the Ohio State University (feh.osu.edu), where we also teach Matlab fundamentals. I have downloaded all the files, and am working on getting a motor controller. Let me know what you expect in terms of documentation.
September 21st, 2010 at 14:44:51
Does it also work with Octave?
(My matlab license has expired)
September 22nd, 2010 at 08:19:30
hi @osu.
Since I’m not a MatLab user I just wanted to know whether somebody could check this examples’ efficiency.
All I could find interfacing Arduino to MatLab was this.
If you really get to control the motor you should sum it on the Playground.
That would be very nice.
Thanks for comment.
Davide
September 22nd, 2010 at 15:13:07
Hans,
It’s all about the serial interface, and I believe if you search for Octave Serial you’ll find a link to some add on code that works in windows, but there is nothing native in the octave.
September 24th, 2010 at 13:16:44
[…] (via Arduino Blog) […]
March 31st, 2011 at 18:03:29
Dear makers of the Matlab interface,
the interface is definitely very interesting, but I do not recognize the “Arduino Motor shield” shown in your photographs. Seams that the shield shown handles not only DC motors, but also stepper motors and servos.
— Could you give a more precise indication on the motor shield shown in this page and also on the Mathworks’ page?
Thanking in advance,
Jose
April 1st, 2011 at 10:01:49
Hi Jose.
I think the motor shown is the one ladyAda sells:
http://www.ladyada.net/make/mshield/
For the reference at MathWorks I advice you to follow & contact Mathworks’ guys, since I didn’t had the chance to test myself the whole process.
Can you report if you find any solution?
Thanks for commenting,
Davide
April 2nd, 2011 at 17:03:53
Hello Davide,
many thanks for the reference. I will try to see if the mshield is sold somewhere in Europe, or even in Portugal. It is definitely interesting to me as an experimental device involving various kinds of motors, not just DC motors.
About the Matlab interface, in the past we had to write C code for the serial port of other devices, but in the last years Matlab has been equipped with a nice serial port interface. Hence I am expecting not to find any problem. The only thing I will try to investigate a little is a way to find automatically the serial port number (i.e. finding a shortcut to the Arduino development env.)
Thanking once more the ref sent, best regards,
Jose
April 23rd, 2011 at 14:28:47
Hello Davide,
Thanks for your reference, i have tried to connect Arduino and Matlab successfully with your help!
However, i also want to connect Arduino with Simulink, but there’s so many errors when i do that. Have u tried to connect Arduino with Simulink?
I use the Arduino Mega 2560 & Matlab r2010b
best regards,
Kem
April 25th, 2011 at 22:49:55
Hi Kem.
Unfortunately I have no idea how can I help you.
You’d better open a thread on the Arduino Forum or maybe on the MathLab one.
Sorry 🙁
D