Using an Arduino and Raspberry Pi Pico in tandem w/ MatLab
38 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
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).
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!