From aa587f9ca9abdd169618b12c59f1714c45990b16 Mon Sep 17 00:00:00 2001 From: Christian Date: Sat, 17 Aug 2019 19:59:42 +0200 Subject: [PATCH] Updated PAJ7620 (markdown) --- PAJ7620.md | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/PAJ7620.md b/PAJ7620.md index e17e2021..edbae37e 100644 --- a/PAJ7620.md +++ b/PAJ7620.md @@ -5,41 +5,60 @@ Compared to the APDS-9960 this sensor is roughly 3-4 times the price, but delive ## Usage: Simple I2C-connection with the usual configuration in Tasmota. +## Wiring breakout boards +| Breakout | ESP8266 | +|----------|-----------| +| VCC/VIN | +3.3VDC | +| GND | GND | +| SCL | GPIO I2C SCL | +| SDA | GPIO I2C SDA | +| INT | NC | + +### Tasmota configuration +Compile Tasmota with `#define USE_PAJ7620` uncommented in `user_config_override.h` + + +*** + ## Commands: -Sensor50 0…5: +## **Sensor50 0…5:** + + ### 0 - no readings / muted sensor ### 1 - Gesture Mode: -gesture names: Up, Down, Left, Right, Near, Far, CW (clockwise rotation), CCW (counter-clockwise rotation) +gesture names: Up, Down, Left, Right, Near, Far, CW (clockwise rotation), CCW (counter-clockwise rotation) TELE-message: …{Up:1} …{Left:3} -> 3 times „Left“ in a row, without any other gesture in between ### 2 - Proximity Mode: -Arbitrary value between 0 (far away) and 255 (very near) are given. Exit from the sensor field will always give at least one „zero message“. TELE is only triggered, when the value has changed +Arbitrary value between 0 (far away) and 255 (very near) are given. Exit from the sensor field will always give at least one „zero message“. TELE is only triggered, when the value has changed TELE-message: …{Proximity:255} - virtually touching the sensor in close proximity …{Proximity:0} - object has left the sensing volume ### 3 - Corner Mode: -Quarters of the sensing volume(area) are organised like this: -1|2 -—- -3|4 +Quarters of the sensing volume(area) are organised like this: -An object in one of the corners will trigger the corresponding number, a bit like a pie menu in a GUI. +| 1 | 2 | +|----------|-----------| +| 3 | 4 | + + +An object in one of the corners will trigger the corresponding number, a bit like a pie menu in a GUI. TELE-message: …{Corner:2} - upper right corner ### 4- PIN mode: -Based on the corner mode a fluent movement of an object through a given sequence of corners (e.g. 1,2,3,4 -> begin upper left, move right, move diagonally down left, move right) will trigger a valid „PIN“ +Based on the corner mode a fluent movement of an object through a given sequence of corners (e.g. 1,2,3,4 -> begin upper left, move right, move diagonally down left, move right) will trigger a valid „PIN“. TELE-message: …{PIN:1} - valid PIN -### 5- cursor mode: -Shows x- and y-coordinates, mainly intended for debugging and „seeing“ the sensing area. This reads only the upper 5-bit-values, which automatically removes much of the jitter, giving values between 0 and 15. +### 5- Cursor mode: +Shows x- and y-coordinates, mainly intended for debugging and „seeing“ the sensing area. This reads only the upper 5-bit-values, which automatically removes much of the jitter, giving values between 0 and 15. TELE-message: …{x:1, y:15} - upper left corner *** -Gesture recognition seems to be more stable than on the APDS-9960, which on the other hand is a lot cheaper. +Gesture recognition seems to be more stable than with the APDS-9960, which on the other hand is a lot cheaper. As expected NEAR and FAR gestures are tricky and you have to train your movements to catch them. Sometimes the sensor reports NEAR and FAR at once (which will be discarded). There is some postprocessing to allow the object (hand or finger) to move into the sensing area and delay the initial direction report (up, down, left, right) to give the chance to trigger (the intended) NEAR or FAR movement. Especially FAR is a bit harder to achieve.