A simple Touch Screen Test application.

pdablue

Active Member
Licensed User
Longtime User
Hi,

This application uses the ImageButton control to test as much of the
PDA's Touch Screen area as possible. I created an array of the smallest
sized ImageButtons that I could. The array is 12 buttons across by 13
buttons down the screen or 13 rows by 12 columns for a total of 156
ImageButtons on a 240 x 320 PDA screen.

You simply press each ImageButton and it will change color. Once you
have pressed all 156 buttons you know if all areas of the PDA's Touch
Screen are working properly. It will give you a good idea if all areas of
the Touch Screen can respond to a Stylus pressing down upon it and
being released.

The ImageButton's "down" and "up" events are used. When a button is
pressed the ImageButton will change to a "red" color. When a pressed
ImageButton is released it will change to a "green" color. An ImageButton
that has not been pressed yet will be a "clear" color.

You can change the color of the ImageButton's "down" and "up" states.

It is interesting to know that you can have up to 156 ImageButtons on
one Form on a 240 x 320 PDA screen.

The file "Tscreen.sbp" is the Basic4ppc source code file for the program.
The file "Tst1.JPG" is a screenshot of the program.
The file "Tst2.JPG" is a screenshot of the program.
The file "Tst3.JPG" is a screenshot of the program.
The file "Tst4.JPG" is a screenshot of the program.
The file "Tst5.JPG" is a screenshot of the program.
The file "Tst6.JPG" is a screenshot of the program.
The file "tscreenzip.zip" is the zipped up ARMV4 (.CAB) installation file.
 

Attachments

  • Tscreen.sbp
    56 KB · Views: 276
  • Tst1.JPG
    Tst1.JPG
    21.6 KB · Views: 220
  • Tst2.JPG
    Tst2.JPG
    25.4 KB · Views: 223
  • Tst3.JPG
    Tst3.JPG
    25 KB · Views: 199
  • Tst4.JPG
    Tst4.JPG
    25 KB · Views: 186
  • Tst5.JPG
    Tst5.JPG
    25.5 KB · Views: 193
  • Tst6.JPG
    Tst6.JPG
    25 KB · Views: 181
  • tscreenzip.zip
    37.1 KB · Views: 235
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi pdablue
I don't really understand the usefullness of the program because your buttons are quite big.
20 * 20 pixels, that means that you are just testing an area of 400 pixels, but you dont know if any pixel inside the ImageButton does respond or not.

Your code has a lot of subroutines, you can shorten the code a lot !
Attached the shortened code Tscreen20_20.sbp.

You can create smaller ImageButtons than 20 * 20 pixels.
Attached an example with variable ImageButton sizes Tscreen5_5.sbp.
The default value is 5, but you can change the value of the dx variable.
This program has no menu, it's just to show the smaller ImageButton.

Best regards.
 

Attachments

  • Tscreen20_20.sbp
    20.2 KB · Views: 203
  • Tscreen5_5.sbp
    1.1 KB · Views: 211
  • Images.zip
    3.9 KB · Views: 211

agraham

Expert
Licensed User
Longtime User
you dont know if any pixel inside the ImageButton does respond or not
Strictly speaking touch screens PDAs do not have pixels but as far as I can see are on most (all? - i can't be dogmatic about that) devices analogue resistive devices that measure voltage at a point along a voltage gradient across both X and Y axes to detect where the stylus. An analogue to digital converter gives a digital indication of the X and Y voltages that the device then scales and offsets to give pixel coordinates.

When we were developing early PDAs the main problems we had were Newtons' Rings appearing as the touch screen layers sagged and stretched in use and non-linearity in the resistive coatings. I suspect that non-linearity concerns are why the position of the calibration points of a device are located where they are. The extreme corner voltages are known as they are the voltage actually applied to the touchscreen. The middle dot is ideally half the applied voltage but the calibration measures it in case it is not. The four other dots between the centre and edge give another set of values that may differ from the ideal so the device now has a four segment linearity "curve" in both X and Y with which to correct the measured voltages.

EDIT:- The best test for touchscreen linearity is to draw with the stylus. You can rapidly test a large area by "scribbling" and it is pretty obvious to the eye if the ink is not following the stylus tip. You just have to be careful not to draw faster than the device can cope with.
 
Last edited:

bdiscount

Active Member
Licensed User
Test Pixels

Here is a simple prog. to test pixel and stylus. You can use it however you like Good luck
:sign0060:
 

Attachments

  • apix.sbp
    2 KB · Views: 231
Top