Arduino read digital input always 1
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
mikel lasa
am 29 Okt. 2020
Beantwortet: mikel lasa
am 5 Nov. 2020
Hello,
I'm trying to read a digital input in simulink and then activate the 13 led pin of my arduino MEGA via a digital output. My problem is that the input is always 1, no matter if I push the button or not. How can I solve this?
Thanks in advance and regards,
0 Kommentare
Akzeptierte Antwort
Aman Vyas
am 2 Nov. 2020
Hi,
You can click the the "Deploy to hardware" button as described in the Run Model on Arduino Hardware topic.
One common error is to click the "Run" button (green triangle), which simulates the model on your host computer. The input is always 1 because they do not exist on the host computer.
Hope it helps !
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Run on Target Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!