TTP223 Class
- ID: ttp223
- Name: Capacitive Touch Sensor
- Other Names: Grove Touch Sensor
- Category: touch
- Manufacturer: seeed
- Link: http://www.seeedstudio.com/depot/Grove-Touch-Sensor-p-747.html
- Connection: gpio
This touch sensor detects when a finger is near the metallic pad by the change in capacitance. It can replace a more traditional push button. The touch sensor can still function when placed under a non-metallic surface like glass or plastic.
Item Index
Methods
Methods
TTP223
-
pin
TTP223 constructor
Parameters:
-
pin
NumberGPIO pin where the sensor is connected
Returns:
name
()
String
Returns the name of this sensor
Returns:
Name of this sensor
value
()
Number
Gets the value from the GPIO pin
Returns:
Value from the GPIO pin
isPressed
()
Boolean
Determines whether the touch sensor is being touched
Returns:
True if touched, false otherwise
installISR
-
level
-
isr
-
arg
Installs an interrupt service routine (ISR) to be called when the button is activated or deactivated.
Parameters:
-
level
Mraa::Edgeundefined
-
isr
FunctionPointer to a function to be called on interrupt
-
arg
Void *Pointer to an object to be supplied as an argument to the ISR.
uninstallISR
()
Uninstalls the previously installed ISR