Richard Parker / EALCD
Embed: (wiki syntax)

« Back to documentation index

EATouch Class Reference

EATouch Class Reference

Class to handle the touch screen on the LCD board. More...

#include <EATouch.h>

Public Member Functions

bool calibrate ()
 Start the calibration routine.
void setThreshold (unsigned short threshold)
 Set the threshold value to register a press after.
void touch (short &x, short &y, bool &pressed)
 Check for a press.

Detailed Description

Class to handle the touch screen on the LCD board.

Author:
Richard Parker

Definition at line 14 of file EATouch.h.


Member Function Documentation

bool calibrate (  )

Start the calibration routine.

Calibration is a 3 point process to set up internal conversion measurements.

Returns:
bool The status as to whether calibration was successful or whether timed out etc.

Definition at line 25 of file EATouch.cpp.

void setThreshold ( unsigned short  threshold )

Set the threshold value to register a press after.

Parameters:
thresholdThe value over which the value read is considered a press.

Definition at line 40 of file EATouch.h.

void touch ( short &  x,
short &  y,
bool &  pressed 
)

Check for a press.

Parameters:
xThe x value of the touch in pixels (converted using calibration settings).
yThe y value of the touch in pixels (converted using calibration settings).
pressedBoolean describing if a touch is detected. If pressed is false then x and y are undefined.

Definition at line 174 of file EATouch.cpp.