A simple Touch Screen Test application.

Discussion in 'Share Your Creations' started by pdablue, Jul 16, 2009.

  1. pdablue

    pdablue Active Member Licensed User


    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.

    Attached Files:

    Last edited: Jul 16, 2009
  2. taximania

    taximania Well-Known Member Licensed User

    I give up :sign0137:


    312 ImageButton clicks:sign0013:
  3. klaus

    klaus Expert Licensed 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.

    Attached Files:

  4. agraham

    agraham Expert Licensed User

    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: Jul 17, 2009
  5. bdiscount

    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

    Attached Files:

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice