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

38 ビュー (過去 30 日間)
Van
Van 2023 年 3 月 15 日
編集済み: Sylvain 2023 年 3 月 16 日
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?

回答 (1 件)

Sylvain
Sylvain 2023 年 3 月 16 日
編集済み: Sylvain 2023 年 3 月 16 日
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).

カテゴリ

Help Center および File ExchangeMATLAB Support Package for Arduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by