Gesture Event Sample
This sample demonstrates detecting hand gestures using GPIO interrupt.
To run the sample:
Download the sample code from https://github.com/Turta-io/IoTHAT3/blob/master/Samples/Python/Gesture_Event.py
Copy the sample code to a folder on the Raspberry Pi.
Open terminal, and then go to the folder you copied the sample.
Run the sample with the following command:
Sample Code
Gesture_Event.py
Result
When you run the sample, it waits for an interrupt signal from the light sensor. When interrupt is detected, the program reads the buffer from the light sensor and searches for gesture directions. If it finds a valid gesture, prints the direction. The example output should be like this:
To stop the Python script, just press CTRL + C.
Last updated