diff --git a/Commands.md b/Commands.md index b2fbddb0..01c61404 100644 --- a/Commands.md +++ b/Commands.md @@ -267,6 +267,7 @@ Sensor20|[Nova Fitness SDS011](Wemos-D1-Mini-and-Nova-Fitne Sensor27|[APDS-9960](APDS-9960) sensor commands
`0` = enable light level and proximity sensor / disable gestures *(default)*
`1` = enable gesture mode/ disable light level and proximity sensor
`2` = enable gestures with half gain / disable light and proximity sensor
`3..255` = Set [ATIME register](APDS-9960#known-issues) for different integration times Sensor29|MCP23008 / MCP23017 I2C GPIO Expander configuration ([additional details](MCP23008-MCP23017))
`Reset` = reset all pins
x = `1..6`
`1` = INPUT mode, no reporting, no pull-up
`2` = INPUT mode, report on CHANGE, pull-up enabled
`3` = INPUT mode, report on LOW, pull-up enabled
`4` = INPUT mode, report on HIGH, pull-up enabled
`5` = OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)
`6` = inverted OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)

`pin,pinmode{,intpullup\|outstate{,repmode}}`
[Continue reading...](MCP23008-MCP23017#device-configuration) Sensor34|  »6.6.0
[HX711 load cell](https://github.com/bogde/HX711) sensor calibration
`1` = reset display to 0
`2` = start calibration
`2` `` = set reference weight in grams and start calibration
`3` = show reference weight in grams
`3` `` = set reference weight in grams
`4` = show calibrated scale value
`4` `` = set calibrated scale value
`5` = show max weight in gram
`5` `` = set max weight in grams
`6` = show single item weight in grams
`6` `` = set single item weight in grams. Once the item weight is set, when items are added to the scale, the telemetry message will report `Count` as the number of items on the scale
`7` = save current weight to be used as start weight on restart
`8` `0/1`   »6.6.0.13
 `0` = disable JSON message on weight change over 4 grams
 `1` = enable JSON message on weight change over 4 grams +Sensor50|[PAJ7620](PAJ7620) gesture sensor
`0` = sensor muted, no readings in Tasmota
`1`= gesture mode
`2` = proximity mode
`3` = corner mode
`4` = PIN mode
`5` = cursor mode Sensor53|[Smart Meter Interface](Smart-Meter-Interface)
`r` = reset the driver with a new descriptor specified with the Tasmota [Scripting](Scripting-Language) language.
`c ` = preset counter (x = `1..5`) to `value` when the driver is set to counter mode
`d` = disable data decoding and dump meter (x = `1..5`) data to the Console. This is used to decipher the meter's data format to define the variable encoding in the meter's descriptor.
`d0` = disable data dump mode and revert to decoding mode. TempRes|Temperature sensor resolution
`0..3` = maximum number of decimal places VoltRes|Voltage sensor resolution
`0..3` = maximum number of decimal places diff --git a/PAJ7620.md b/PAJ7620.md index cb5d2d53..5b0936d0 100644 --- a/PAJ7620.md +++ b/PAJ7620.md @@ -1,11 +1,15 @@ -PAJ7620U2 is an integrated gesture recognition sensor from PixArt-Imaging Inc. based on infrared. It also has a built-in proximity detection and can sense various properties like position (x,y,z) and speed. -Compared to the APDS-9960 this sensor is roughly 3-4 times the price, but delivers its data without the need for expensive computations on the ESP8266. Gestures are read from one single I2C-register und only light post-processing is applied. +**This feature is not included in precompiled binaries.** To use it you must [compile your build](compile-your-build). Add the following to `user_config_override.h`: +``` +#ifndef USE_PAJ7620 +#define USE_PAJ7620 // PAJ7620 gesture sensor (I2C address 0x73) (+2.5k code) +#endif +``` +---- +PAJ7620U2 is an integrated gesture recognition sensor from PixArt-Imaging Inc. based on infrared. It also has built-in proximity detection and can sense various properties like position (x,y,z) and speed. +Gesture recognition seems to be more stable than with the [APDS-9960](APDS-9960), which on the other hand is a lot cheaper. -## Usage: -Simple I2C-connection with the usual configuration in Tasmota. - -## Wiring breakout boards +### Wiring breakout boards | Breakout | ESP8266 | |----------|-----------| | VCC/VIN | +3.3VDC | @@ -14,60 +18,63 @@ Simple I2C-connection with the usual configuration in Tasmota. | SDA | GPIO I2C SDA | | INT | NC | -### Tasmota configuration -Compile Tasmota with `#define USE_PAJ7620` uncommented in `user_config_override.h` +After configuring the GPIO's the driver will detect the PAJ7620 automatically. +> After restart Tasmota needs some time to completely configure its state. In this time frame it is likely to miss some gestures. This should stabilize after a few moments. -*** - -## Commands: -## **Sensor50 0…5:** +### Commands +To use the sensor you need to switch to the desired mode of operation with +`Sensor50 ` where \ = `0…5`. It will not appear in the webUI but it can be observed via MQTT messages in console. +#### `0` - Off +Sensor muted, no readings in Tasmota. +#### `1` - Gesture Mode +Reports gesture movement with: + `Up` + `Down` + `Left` + `Right` + `Near` + `Far` + `CW` _(clockwise rotation)_ + `CCW` _(counter-clockwise rotation)_ -### 0 - No readings / muted sensor -### 1 - Gesture Mode: -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 +>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. -### 2 - Proximity Mode: -Arbitrary values 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 +example: +`…{Up:1}` = up gesture once +`…{Left:3}` = left gesture 3 times in a row, without any other gesture in between -### 3 - Corner Mode: -Quarters of the sensing volume(area) are organised like this: +#### `2` - Proximity Mode +Arbitrary values 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. -| 1 | 2 | -|----------|-----------| -| 3 | 4 | +example: +`…{Proximity:255}` = close proximity, almost touching the sensor +`…{Proximity:0}` = object has left the sensing area +#### `3` - Corner Mode +Sensing area is organised in quarters. An object in one of the corners will trigger the corresponding number. -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 +| 1 | 2 | +|:-:|:-:| +| 3 | 4 | -### 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“. The next corner must be reached in about 0.7 seconds. -TELE-message: -…{PIN:1} - valid PIN +example: +`…{Corner:2}` = object in upper right corner -### 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 +#### `4` - PIN Mode: +A fluent movement of an object through a given sequence of corners (similar to unlocking a smartphone) will trigger a valid "PIN". The next corner must be reached in about 0.7 seconds. +example: +`…{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. -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. - -After restart TASMOTA needs some time to completely configure its state. In this time frame it is likely to miss some gestures. This should stabilize after a few moments. +example: +`…{x:1, y:15}` = upper left corner The sensor provides some more goodies, like velocity of an object, so if someone has a fancy use case for this, feel free to open a feature request. -Of course it would be possible to mix the modes, but this can produce a lot of TELE-messages. This could be added later upon user request (based on real world use cases). +Of course it would be possible to mix the modes, but this can produce a lot of examples. This could be added later upon user request (based on real world use cases). \ No newline at end of file