How to interface touch screen with simulink to determine the position of a moving ball on a plate
2 次查看(过去 30 天)
显示 更早的评论
Hi, Im attempting to use a 4 wire resistive touch screen to determine the position of a ball on a given plate. The idea is that the error from the reference point will be calculated and then using a state space regulator servo motors will adjust the plate to return the ball to its reference position. I'm having trouble with the touch screen. I am trying to run it through an Arduino mega 2560. Essentially voltage is applied to X+ while X- and Y- are tied to ground and voltage read from Y+ and vice versa. This isn't working out too well for me. Is there a better way of doing this in particular to have it working in simulink. I have completed a lot of searches but can only find references to touch screens and Arduino boards but nothing discussing how it was completed. Any help would be very more appreciated. Even been pointed in the right direction would be great. Thanks peter
11 个评论
William Jara Loaiza
2018-10-17
Hello everyone, I share my little experience in this same project since like all of us here I have researched a lot of this.
I have not yet been able to solve Peter's problem because as mentioned, with MatLab it is very complicated to communicate the touch screen and send the data to simulink in real time. For all this I found a way in which the programming similar to the one mentioned in matlab is loaded in arduino, then arduino sends the values of the position through the serial port where now we can read them in real time from simulink.
Here I share a link that explains a bit how to do the serial communication that I am referring to.
https://wechoosethemoon.es/2011/07/21/arduino-matlab-simulink-controlador-pid/
Ahmet Ünser
2021-5-28
编辑:Ahmet Ünser
2021-6-9
Hello everyone,
I'm working on the same project "Ball on Plate" right now. Does anyone have a solution for this problem?
I want to see the output of the touchscreen via simulink.
Would be grateful, if anyone could help me further.
Thank you in advance !
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!