Work with 2 raspberry pi together on Matlab

3 ビュー (過去 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 Center および File ExchangeMATLAB 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