defragster
Senior Member+
Perhaps the TouchPaint sample came from a different default rotation? The PJRC LIB follows the device DOC labelling of x,y. That sketch works with:
That isn't the best use of the screen - but that rotation aligns with the x,y as they are returned by the device.
I just put the above TS_GetMap into the sketch and when started at TS_Rotate=2 it runs well. The "#define TS_DEBOUNCE 3" causes dot skipping as it ignores adjacent dots and should be set to 1 perhaps for this app.
Here is my version: View attachment TouchPaint_nov03a.ino <edited>
In case this makes it to a SAMPLE I fixed the setup() wait for serial. I also changed the debounce to 1. It does get spurious hits - something you don't see when not painting each hit. One thing might be to add a Z threshold in the GetMap - another might be to slow down the polling rate with a 30ms delay between calls.
tft.setRotation(1);
That isn't the best use of the screen - but that rotation aligns with the x,y as they are returned by the device.
I just put the above TS_GetMap into the sketch and when started at TS_Rotate=2 it runs well. The "#define TS_DEBOUNCE 3" causes dot skipping as it ignores adjacent dots and should be set to 1 perhaps for this app.
Here is my version: View attachment TouchPaint_nov03a.ino <edited>
In case this makes it to a SAMPLE I fixed the setup() wait for serial. I also changed the debounce to 1. It does get spurious hits - something you don't see when not painting each hit. One thing might be to add a Z threshold in the GetMap - another might be to slow down the polling rate with a 30ms delay between calls.
Last edited:

