フィルターのクリア

only one simulink control two arduino mega2560

2 ビュー (過去 30 日間)
JAE HONG LEE
JAE HONG LEE 2022 年 7 月 13 日
コメント済み: M.B 2022 年 8 月 1 日
Hi, I want only one simulink browser, control two arduino mega2560
but arduino mega only 3 interrupt pin so I want using 4 interrupt pin than I must using 2 ardubio mega2560
problem is one simulink brower only using one arduino so I can't using 4 interrupt pin.
someone solve this problem, please remain me...

回答 (1 件)

M.B
M.B 2022 年 7 月 13 日
Hi,
Connecting two arduinos to Simulink is not easy. Could you explain what you are trying to achieve?
FYI, Arduino Mega 2560 has 6 interrupt pins: 2,3,18,19,20,21
  2 件のコメント
JAE HONG LEE
JAE HONG LEE 2022 年 7 月 13 日
I want 4 DC motor control so one DC motor using A and B encoder.
1 DC motor encoder using 2 interrupt pins
num 0 motor 2,3 interrupt pins
num 1 motor 18, 19 interrupt pins
num 2 motor 20, 21 interrupt pins
num 3 motor ??, ?? interrupt pins
so I using two arduino mega2560, finally I must using interrupt pins
can u give some Tip connect two mgea 2560?.
M.B
M.B 2022 年 8 月 1 日
You could use one Arduino as Master and the second a slave.
Computer -> (usb cable) -> Arduino1 -> (digital or analog pins) -> Arduino2
Motor 1 & 2 Motor 3 & 4
If Arduino is not critical to your design, you can use an ESP32. This board is dual core and has up to 32 interupts per core. You can program it using Arduino IDE.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by