pyupm_ttp223 module

class pyupm_ttp223.TTP223(pin)[source]

Bases: object

API for the TTP223 Touch Sensor.

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.

C++ includes: ttp223.hpp

installISR(level, isr, arg)[source]

void installISR(mraa::Edge level, void(*isr)(void *), void *arg)

Installs an interrupt service routine (ISR) to be called when the button is activated or deactivated.

isr: Pointer to a function to be called on interrupt

arg: Pointer to an object to be supplied as an argument to the ISR.

isPressed()[source]

bool isPressed()

Determines whether the touch sensor is being touched

True if touched, false otherwise

name()[source]

std::string name()

Returns the name of this sensor

Name of this sensor

uninstallISR()[source]

void uninstallISR()

Uninstalls the previously installed ISR

value()[source]

int value()

Gets the value from the GPIO pin

Value from the GPIO pin