Arduino Simulink Analog input
15 views (last 30 days)
Show older comments
anil on 3 Feb 2014
Commented: Quang Huy on 10 Jan 2021
I AM USING A AUDRINO ANALOG INPUT PIN TO DISPLAY A VOLTAGE. WHEN I RUN THE MODEL ON TARGETED HARDWARE I ENDED UP GETTING ZERO. CAN ANY ONE HELP ME...
Rolfe Dlugy-Hegwer on 7 Feb 2014
Hi Anil, It sounds like you clicked the Run (green triangle) button, which simulates the model on your host computer. Try clicking the Deploy to Hardware button instead. See http://www.mathworks.com/help/simulink/ug/run-model-on-arduino-hardware.html
zeghib okba on 10 May 2016
Edited: zeghib okba on 10 May 2016
Hi Anil, the problem may be doing from 2 things:
1- you should be using arduino mega2560 for display a voltage.
2- You may be inverted the signal, because arduino is not accepted negative signal.
Tal Dachlika on 29 Jan 2018
I had the same problem with arduino uno and I fixed it, just change the mode to external: simulation->mode-> external.
Quang Huy on 10 Jan 2021
I had the same problem with arduino uno. I tried it the way you do but not sucessfull.
Find more on Simulink Support Package for Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!