Hyperpixel Python Help

Hi all,

I’m rather new to python and am struggling to find any documentation that clearly lays out how to handle touch events from the Hyperpixel (round) in Python.

At this stage, I’m just shoot to print a “Hello World” when the screen is touched.

I’ve been able to achieve that using the code below however the touch continues to be tracked i.e. if I hold my finger and move it around the screen it prints “Hello World” continuously. If I touch the screen for even the briefest of moments it still prints “Hello World” about four times.

from hyperpixel2r import Touch

touch = Touch()

def touch(self, x, y, state):
     print("Hello World")

Down the track I would like to be able to trigger a USB connected camera by touching the screen and obviously don’t want to trigger the shutter four times every time.

I guess to be more succinct with my question:

How can I ask the screen to only look for a single tap event rather than continuously track my finger?

Many thanks in advance for any help.