Run simulation using multiple arduino mega in the same laptop

4 ビュー (過去 30 日間)
Noor Amira Ilyanie
Noor Amira Ilyanie 2023 年 7 月 7 日
回答済み: Anshuman 2023 年 8 月 8 日
I had connected 2 usb from 2 arduino mega. one board is programmed using Arduino software, while another one board is programmed using simulink. Why the programmed code does not run when both codes is running?
  1 件のコメント
Monalisha
Monalisha 2023 年 7 月 7 日
Hello Noor,
Can you please elaborate your worklow a little bit for better understanding.
Which programmed board are you referring here which doesn't work?

サインインしてコメントする。

回答 (1 件)

Anshuman
Anshuman 2023 年 8 月 8 日
Hi Noor,
When you connect two Arduino Mega boards to your computer, one programmed using the Arduino software and the other programmed using Simulink, it's important to consider a few factors that may affect the execution of the code on both boards simultaneously.
  • Serial Communication: Both Arduino boards may be using the same serial communication port to communicate with the computer. This can cause conflicts when both boards attempt to send or receive data simultaneously. Ensure that each board is assigned a different serial port to avoid conflicts.
  • Pin Assignments: Check if there are any conflicting pin assignments between the two programs. If both programs try to use the same pins simultaneously, it can lead to unexpected behavior or errors. Make sure the pin assignments are unique and do not overlap.
  • If the programs on both boards involve time-sensitive operations or interrupts, conflicts may occur.
Hope it helps!

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by