How to run Arduino Code with Matlab

4 vues (au cours des 30 derniers jours)
Edward
Edward le 13 Juin 2013
Hello, so I am very new with Matlab and with the Arduino Uno that I have. I watched some youtube videos where people have controlled their Arduino board through Matlab. I downloaded the Arduino support package on MathWorks. I want to control a stepper motor and was wondering if it would be possible to run the code all through MatLab. The reason why I want to control it with Matlab is because I will be having a data acquisition device and a load cell hooked up to the Arduino board to gather data. What I'm not sure is if I also have to have some code in the Arduino script. Just a simple answer to get me started will be greatly appreciated. I am in the process of learning the programming language.

Réponses (1)

Kaustubha Govind
Kaustubha Govind le 13 Juin 2013
The "sample usage" section on the MATLAB Support Package for Arduino download page lists out all the available interfaces with the package. Note that if you have additional devices connected to the board, you can only talk to them through one of those interfaces (unless you want to extend the package). In the instructions for the Support Package, you will see that you need to download a server (.pde) file, which is also part of the package, to the Arduino board. This server will read and interpret the commands sent from the MATLAB Support package via the serial port (USB) interface.
  1 commentaire
Michael Pawlowski
Michael Pawlowski le 21 Oct 2017
Is there a way to analyse your arduino "Code" through matlab. Meaning the code is uploaded to the arduino device using standard arduino software. Is there a way to interface to run that code through matlab to see its outputs?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Arduino Hardware dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by