PAJ7620 Gesture Sensor
Overview
This sample application gets the output of a gesture sensor (PAJ7620) using either polling or triggers, and outputs the corresponding gesture to the console, each time one is detected.
Requirements
To use this sample, the following hardware is required:
A board with I2C support (and GPIO to detect external interrupts in trigger mode)
PAJ7620 sensor
Building and Running
This sample outputs data to the console. It requires a PAJ7620 sensor.
Polling Mode
west build -b nucleo_f334r8 samples/sensor/paj7620_gesture
Trigger Mode
In trigger mode, the sample application uses a GPIO to detect external interrupts, therefore GPIO
support must be enabled. Just like every sensor supporting trigger mode, it is possible to choose
between using a global thread (CONFIG_PAJ7620_TRIGGER_GLOBAL_THREAD
) or a dedicated thread
(CONFIG_PAJ7620_TRIGGER_OWN_THREAD
) for the interrupt handling.
west build -b nucleo_f334r8 samples/sensor/paj7620_gesture -- -DEXTRA_CONF_FILE=trigger.conf
Sample Output
Gesture LEFT
Gesture RIGHT
Gesture UP
Gesture DOWN