nanoFramework.Iot.Device.Paj7620
v1.0.71Latest Stable
Any Framework
PAJ7620U2 gesture sensor binding for .NET nanoFramework C# projects
Published
Aug 31, 2026
1mo ago
Total Downloads
475
475
Install
dotnet add package nanoFramework.Iot.Device.Paj7620 --version 1.0.71
No framework information available.
README
PAJ7620U2 gesture sensor
Iot.Device.Paj7620 is a .NET nanoFramework binding for the PixArt PAJ7620U2 gesture sensor.
Features
- I2C communication (
0x73default address) - Device ID validation during initialization
- Seeed-compatible initialization sequence
- Gesture decoding for:
- Up, Down, Left, Right
- Forward, Backward
- Clockwise, CounterClockwise
- Wave
Usage
Create Paj7620, call Initialize(), then poll TryReadGesture(...).
using Iot.Device.Paj7620;
using System.Device.I2c;
using System.Diagnostics;
using System.Threading;
using nanoFramework.Hardware.Esp32;
Configuration.SetPinFunction(Gpio.IO05, DeviceFunction.I2C1_DATA);
Configuration.SetPinFunction(Gpio.IO06, DeviceFunction.I2C1_CLOCK);
I2cConnectionSettings settings = new(1, Paj7620.DefaultI2CAddress);
using (Paj7620 sensor = new(I2cDevice.Create(settings)))
{
sensor.GestureDebounceMilliseconds = 500;
sensor.Initialize();
Debug.WriteLine("PAJ7620 initialized.");
while (true)
{
if (sensor.TryReadGesture(out Gesture gesture))
{
Debug.WriteLine($"Gesture: {gesture}");
}
Thread.Sleep(50);
}
}
See samples for a complete sample application.
Gesture mapping
The driver maps gesture result bitfields to the enum Gesture as follows:
0x0001->Up0x0002->Down0x0004->Left0x0008->Right0x0010->Forward0x0020->Backward0x0040->Clockwise0x0080->CounterClockwise0x0100->Wave
Notes
- The sensor requires successful
Initialize()before reads. - There is a default 500 ms debounce period after each detected gesture. This can be adjusted at runtime using
sensor.GestureDebounceMilliseconds. - Polling intervals between 20 ms and 100 ms are commonly stable in practice.
- Reliable detection depends on distance, hand speed, and ambient conditions.
- The sample uses I2C pins 5 (SDA) and 6 (SCL) on ESP32. Adjust pin configuration as needed for your board and wiring.
Changes from Previous Version
No structural changes between v1.0.47 and v1.0.71.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.