Arduino Simulink Analog input

조회 수: 13 (최근 30일)
anil
anil 2014년 2월 3일
댓글: Quang Huy 2021년 1월 10일
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...

답변 (3개)

Rolfe Dlugy-Hegwer
Rolfe Dlugy-Hegwer 2014년 2월 7일
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
  댓글 수: 4
Terry Ramsey
Terry Ramsey 2014년 2월 16일
편집: Terry Ramsey 2014년 2월 16일
my blocks being used are: Analog Input (pin 0). I have pin 0 on arduino connected to an analog input(a potentiometer with 0-5V in this case). Sample time = 0.5. A Display block. Short format. Decimation = 1. They are connected together.
Not sure why this isnt working.
anil
anil 2014년 5월 28일
편집: anil 2014년 5월 28일
HI Terry Ramsey, the external mode isn't work on the arduino uno. it will run on the arduino mega. they say uno doesn't have enough memory to perform in external mode.
i got this from matlab virtual seminor.

댓글을 달려면 로그인하십시오.


zeghib okba
zeghib okba 2016년 5월 10일
편집: zeghib okba 2016년 5월 10일
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
Tal Dachlika 2018년 1월 29일
I had the same problem with arduino uno and I fixed it, just change the mode to external: simulation->mode-> external.
  댓글 수: 1
Quang Huy
Quang Huy 2021년 1월 10일
I had the same problem with arduino uno. I tried it the way you do but not sucessfull.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by