Skip to content

touch

Raw touch input, for flows that don't use the GUI. It reads a capacitive touch panel and sends a message when a finger lands and when it lifts.

A gui screen reads its panel itself, so you don't need this node to press buttons. One panel can't be used by both a gui screen and a touch node: Deploy stops and names them.

Properties

  • touch panel — which touch panel to read. Pick one, or add one with +.
  • orientation — the turn of the picture these touches match: 0, 90, 180 or 270 degrees clockwise, the same four angles a display's orientation takes. Set it when the screen is turned and the flow reads touch through this node. Off leaves the panel's own axes alone. A flow with a gui screen sets orientation on the display instead and leaves this off: the screen turns its own touches to match.

Wiring

Output — down and up, each with the touch point:

msg = {'payload': {'x': 120, 'y': 340}, 'topic': 'down'}   # a finger lands
msg = {'payload': {'x': 121, 'y': 338}, 'topic': 'up'}     # it lifts, where it was last seen

Down and up only: nothing is sent while the finger moves, and only one finger is followed. The coordinates are screen pixels in the turned picture, so they match what the display shows when the orientation is set (and in the panel's own axes when it is off). There is nothing to calibrate.

Behavior

The status dot shows whether the panel is answering (FT6336U, or no reply from FT6336U at 0x38 on I2C bus 0). A missing panel sends nothing and is picked up when it appears. A panel that disappears mid-touch still sends its up.