Skip to content

Conversation

batkay
Copy link
Contributor

@batkay batkay commented Oct 13, 2025

Description

This PR updates the APDS9960 gesture sensor with the ability to process gestures from it's gesture engine.

Specific Changes

  • Added KConfig option to enable gestures and set a detection threshold.
  • Added private enum for gesture channel and its results.
  • Added logic to read the gesture diode FIFO, and interpret results into UP, DOWN, LEFT, and RIGHT gestures.
  • Updated sample program to display gestures (starts disabled to not disrupt previous behavior).

Testing

Testing was done with a nRF52840dk, with the following device overlay:

&i2c0 {

	apds9960: avago_apds9960@39 {
		compatible = "avago,apds9960";
		// int-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
		reg = <0x39>;
	};
};

In addition, in the prj.conf file, the following line was modified:
'CONFIG_APDS9960_ENABLE_GESTURE=y'

The new sample program output shows the following output with gestures:
unknown

@batkay batkay force-pushed the apds9960_gesture branch 3 times, most recently from eb2d08a to 526e4b1 Compare October 13, 2025 03:14
Created sensor specific channels and Kconfig for gesture sensing.

Signed-off-by: Thomas Lang <[email protected]>
Created logic to calculate gestures from the APDS9960 sensor

Signed-off-by: Thomas Lang <[email protected]>
Added a new channel fetch to demonstrate reading gestures

Signed-off-by: Thomas Lang <[email protected]>
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants