a. Screen Calibration

<< Click to Display Table of Contents >>

Navigation:  Tutorials > Tutorial 19 - Miscellaneous Commands >

a. Screen Calibration

This section shows how to perform screen calibration using the Calibration() command.



Command Prototype


uint16_t Calibration()






void setup()


/* Initialize CleO - needs to be done only once */



/* Start screen calibration */




void loop()


 int16_t x, y, dur, tag;

 CleO.TouchCoordinates(x, y, dur, tag);


 CleO.StringExt(FONT_MEDIUM, 160, 150, LIGHT_GREEN, MM, 0, 0,

 "touch test started");


 if (dur)

   CleO.CircleExt(x, y, 10, 20, DARK_ORANGE, MM, 0, 0);


   CleO.StringExt(FONT_MEDIUM, 160, 240, LIGHT_GREEN, MM, 0, 0,

   "no touch detected");








The above code snippet shows that you are only required to call the Calibration() command which will initiate the calibration sequence by prompting the users to touch the predefined points on the screen.

Upon successfully calibrating, the touch test will start.

A circle will be drawn on the screen with touch points as a center point.





Here is the output displayed upon executing the code snippet -


Screen Calibration