Issue with Simulink and Arduino Nano 33 IoT

11 visualizaciones (últimos 30 días)
Radko
Radko el 18 de Nov. de 2023
Movida: Walter Roberson el 18 de Nov. de 2023
I am writing to bring to your attention an issue I encountered while working with Simulink and Arduino Nano 33 IoT.
I have 8 AEK rev.2 boards, and as a teacher, I began working with one of them. While everything appears to be in order, I am facing difficulties running models on the board in Simulink IO mode. Specifically, the example provided at [ https://www.mathworks.com/help/sldrt/ug/sync-models-by-using-arduino-connected-io-board-example.html#d126e10613 works on my UNO but encounters an error on Nano 33 IoT. The error from Simulink is as follows:
Error: MATLAB System block 'sldrtex_arduino/Digital Output' error occurred when invoking 'setupImpl' method of 'codertarget.arduinobase.blocks.DigitalWrite'. The error was thrown from 'C:\ProgramData\MATLAB\SupportPackages\R2023b\toolbox\target\shared\devicedrivers\+matlabshared\+devicedrivers\+blocks\DigitalIO.p' at line 0 ... Caused by: Configuring Pin 13 as Digital Input/Output failed. Pin 13 is not a valid Digital Input/Output pin. Reconnect the hardware, provide a valid Digital Input/Output pin number for your hardware and try again. However, deploying and Start code for DC motors, servos, or Lion Battery monitoring has been successful. Additionally, the Monitor and Tune Simulink mode works well on Nano 33 IoT.
I would appreciate any recommendations on how to set up Matlab/Simulink to address this issue.
Thank you for your assistance.

Respuestas (2)

Walter Roberson
Walter Roberson el 18 de Nov. de 2023
You might possibly be having difficulty because of the difference between the physical pin numbers (such as 13) compared to Digital Pin numbers such as D13
According to https://static.rapidonline.com/pdf/73-4863_v1.pdf D13 is physical pin #1
  1 comentario
Radko
Radko el 18 de Nov. de 2023
But whent i deployed it and run , everything is ok .

Iniciar sesión para comentar.


Radko
Radko el 18 de Nov. de 2023
Movida: Walter Roberson el 18 de Nov. de 2023
Here is the solution which works for me: https://forum.arduino.cc/t/simulink-communication-interface-missing-serial/1069853/10?u=radko_kozakovic There is necessary to correctly set up Different numbers for host com port and for Bootloader COM port.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by