Work with 2 raspberry pi together on Matlab

조회 수: 1 (최근 30일)
Sapir Zurist
Sapir Zurist 2021년 3월 24일
편집: Stefanie Schwarz 2022년 1월 11일
Hi,
I want to right a code that will be able to work with 2 raspberry pi in parellel.
I have function that works with the first raspberry pi (name it A) and another function that works with the second raspberry pi (name it B).
When I try to call both of the functions, only the first one is works...
Is it possible at all to be connected to 2 raspberry pi through Matlab in parallel?
If yes - what am I missing here?

채택된 답변

Prasanth Sunkara
Prasanth Sunkara 2021년 3월 25일
편집: Stefanie Schwarz 2022년 1월 11일
You can create two different raspi objects.
Say,
raspiObjA = raspi('<A's_IP_addr>')
raspiObjB = raspi('<B's_IP_addr>')
Now call your function with either raspiObjA or raspiObjB as input argument, e.g.
returnValueA = myCustomFunction(raspiObjA, var1);
returnValueB = myCustomFunction(raspiObjB, var2);
Thanks,
Prasanth

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for Raspberry Pi Hardware에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by