Hi guys.
I'm just trying to simply take coordenates from the DS touch. The code is attached, as I not yet know how to make it appear in the middle of the text in that pretty way within a box.
Half the job is done:
The x axis input reading is ok: it's ranging from more or less 40 to 900. As far as I know, that's quite a good behavior.
But the problem is the y axis input reading. It's weird: ranging from 770 to more or less 820.
My circuit is very simple: I'm using one of those breakout units from sparkfun to connect the screen to the arduino. A0 to Y1 , A1 to X2 , A2 to Y2 and A3 to X1 , plus 4x10k pulldown resistors. The problem can't be here.
More weird is the fact that just one of the readings isn't correct. It would make more sense if both weren't. Furthermore, the functions of the X1 and X2 as +5V or GND (when measuring x coordenate), or as sensor and open circuit (when measuring y coordenate) can interchange without problem. But you can't do the same with the Y1 and Y2 connections: when reading x coordenate, Y2 has to be the sensor, and when reading y coordenate, Y2 has to be +5V, otherwise it doesn't work at all. Beyond that, I can just pull off the Y1 connection, and the readings keep beeing the same as described.
This leads me to believe that there's some problem with the Y1 connection. But I already know that, if that's the case, the problem is inside the screen and there's nothing to do, cause all the connections with the screen terminals were already tested and they are fine.
Well, I'm really out of resources. I would REALLY appreciate any help, as I've already lost several hours dealing with this problem. Thank you very much for reading, and sorry for the crippled english.
BasicTouchScreen_gamma.ino (1.1 KB)