LightTouch (community library)

Summary

Name Value
Name LightTouch
Version 0.0.2
Installs 305
License GNU GPLv3
Author Benjamin Veenema ben@veenemadesignworks.com
URL https://github.com/bveenema/lighttouch
Repository https://github.com/bveenema/lighttouch.git
Download .tar.gz
All Versions 0.0.2, 0.0.1

A light-weight [4-wire] Touchscreen library

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.

LightTouch

A lightweight touchscreen library (4 wire) for particle devices. Scans the touchscreeen for touches and outputs position after debouncing. Debouncing is accomplished with oversampling scan detection.

update() must be called regularly from main loop. When update returns true, main loop can call getX() and getY() for position data.

Position data can be mapped to an LCD screen by defining MAPTOSCREEN and determining the min and max, X and Y values of the touchscreen.

Pressure readings can be performed by defining EnablePressureRead in the header file. Pressure varies with X position and is not recommended for reliable detection of touches.

Inspired by Touch_4Wire library by ScruffR and Adafruit Touch library

Created by Veen Nov. 24 2015

LightTouch(uint8_t xp, uint8_t yp, uint8_t xm, uint8_t ym)

bool update(void)

int16_t getX(void)

int16_t getY(void)

bool scan(void)

int16_t readTouchY(void)

int16_t readTouchX(void)

void setRXPlate(uint16_t rxPlate)

int16_t readPressure(void)

int16_t getPressure(void)

Browse Library Files