"Expected u to be a scalar" Error
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/473097/image.jpeg)
So, i tried to run this Simulink code, then i got this error:
MATLAB System block 'arduino_project/LED Red' error occurred when invoking 'validateInputsImpl' method of 'codertarget.arduinobase.blocks.DigitalWrite'. The error was thrown from ' 'C:\ProgramData\MATLAB\SupportPackages\R2020b\toolbox\target\supportpackages\arduinobase\+codertarget\+arduinobase\+blocks\DigitalWrite.p' at line 0 'E:\Apps\MatLab2020b\toolbox\shared\spcuilib\slscopes\+Simulink\+scopes\+source\@WiredSource\sendSimulationCommand.m' at line 13 'E:\Apps\MatLab2020b\toolbox\shared\spcuilib\unifiedscopes\@uiservices\fevalNoBacktrace.m' at line 10 'E:\Apps\MatLab2020b\toolbox\shared\spcuilib\slscopes\+Simulink\+scopes\+source\@WiredSource\sendSimulationCommand.m' at line 13 'E:\Apps\MatLab2020b\toolbox\shared\spcuilib\slscopes\+Simulink\+scopes\+source\@PlaybackControls\slPlayPause.p' at line 0 'E:\Apps\MatLab2020b\toolbox\shared\spcuilib\slscopes\+Simulink\+scopes\+source\@PlaybackControls\PlaybackControls.p' at line 0'.
Caused by:
- Expected u to be a scalar.
Anyone know what should i do?
3 Commenti
Walter Roberson
il 10 Ago 2023
Modificato: Walter Roberson
il 10 Ago 2023
I just noticed that the thermal sensor is compared to a value, and combined on a bus with a boolean, producing a bus with two booleans, and that bus is being sent to arduino digital output. But arduino digital output is expecting a scalar not a bus.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Modeling in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!