Serial and external mode Arduino

34 views (last 30 days)
Matthieu GATINE
Matthieu GATINE on 4 Dec 2018
Commented: Hak YAL on 10 Oct 2021
Hi,
I have deployed a simulink subsystem to my Arduino UNO and I have change the S-function block to a serial transmit arduino block and a serial receiving arduino block.
I'm trying to run my model on external mode but I have this error message : "Both Serial Receive block and External mode use Pin number 0"
How can I use external mode and serial port at the same time ?
Thank you.

Answers (1)

Hamidreza Hoshyarmanesh
Hamidreza Hoshyarmanesh on 22 Mar 2019
You need to change the port number on your serial transmit block to 1 or 2 (depending on the type of Arduino you were using). The port 0 is assigned to programming Arduino as a slave device for Simulink not as a host for other slaves which are connected to Arduino serial ports.
Regards,
Hamidreza
  2 Comments
Hak YAL
Hak YAL on 10 Oct 2021
I have the same problem and I would be happy to hear the solution.

Sign in to comment.

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by