Using an Arduino and Raspberry Pi Pico in tandem w/ MatLab

38 visualizaciones (últimos 30 días)
Van
Van el 15 de Mzo. de 2023
Editada: Sylvain el 16 de Mzo. de 2023
I am working on a group project that involves the use of stepper motors and image processing via an affixed camera module. We have two Arduino Mega 2560 Rev3 microcontrollers, each corresponding to a NEMA 23 stepper motor, but only a Raspberry Pi Pico to control the camera module due to budgetary constraints and due to a previous version of the project using Raspberry Pi for all components. Would it be possible to induce simultaneous control of both microcontroller models in a MatLab script, and if so, what toolboxes would be the optimal choices to go about doing so?

Respuestas (1)

Sylvain
Sylvain el 16 de Mzo. de 2023
Editada: Sylvain el 16 de Mzo. de 2023
As far as I understand your question, yes, you can simultaneously control both Arduino Mega 2560 Rev3, using the Arduino Support Package for MATLAB (https://uk.mathworks.com/hardware-support/arduino-matlab.html)
As you can see this does not suppor the Raspberry Pi Pico.
in your script, you would define 2 arduino devices:
a1 = arduino('COM1');
a2 = arduino('COM2');
and work separately on each object.
if you wish to use the RPico, you would need to program it on its own and etablish a communication for example with your PC using a serial object. (I might be wrong, but that would be the idea).

Categorías

Más información sobre MATLAB Support Package for Arduino Hardware en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by