pinmode 6

Michael Ingraham 2019-10-02 11:46:10 -04:00
parent bca98d6f69
commit 2f5131ec81
1 changed files with 1 additions and 1 deletions

@ -72,7 +72,7 @@ The behavior of all pins on the MCP23008/MCP23017 can be reset to a specific set
Command|Parameters
-|-
Sensor29<a id="Sensor29"></a>|MCP23008 / MCP23017 I<sup>2</sup>C GPIO Expander configuration<BR>`Reset<x>` = reset all pins<BR>x = `1..5`<BR>`1` = INPUT mode, no reporting, no pull-up<BR>`2` = INPUT mode, report on CHANGE, pull-up enabled<BR>`3` = INPUT mode, report on LOW, pull-up enabled<BR>`4` = INPUT mode, report on HIGH, pull-up enabled<BR>`5` = OUTPUT mode (if enabled by #define USE_MCP230xx_OUTPUT)<BR><BR>`pin,pinmode{,intpullup\|outstate{,repmode}}`<ul></ul>`pin` = the I/O pin on the MCP230xx chip<ul><li>`0..7` for MCP23008</li><li>`0..15` for the MCP23017)</ul>`pinmode` = operational mode of the pin (`?, 0..5`)<ul><li>`?` = query pin configuration</li><li>`0` = Disabled (deprecated, but will be default for previously unconfigured devices)</li><li>`1` = INPUT (Floating - only telemetry data will be sent according to configuration `TelePeriod` intervals)</li><li>`2` = INPUT with INTERRUPT on CHANGE (will send an MQTT output on state change from LOW to HIGH **and** HIGH to LOW)</li><li>`3` = INPUT with INTERRUPT on CHANGE to **LOW** (will send an MQTT output on state change **only** from HIGH to LOW)</li><li>`4` = INPUT with INTERRUPT on CHANGE to **HIGH** (will send an MQTT output on state change **only** from LOW to HIGH)</li><li>`5` = OUTPUT (if enabled with `#define USE_MCP230xx_OUTPUT`)</li></ul>`intpullup` *(pinmode `1..4`)*. Pull-up resistors are disabled by default for pin mode `1` whilst enabled by default for pin modes `2..4` (because they are interrupt enabled pins and we do not want signal bounce). The internal pull-up on these pins may be disabled if necessary if you are biasing them externally.<ul><li>`0` = weak internal pull-up disabled *(default for pinmode `1`)*</li><li>`1` = weak internal pull-up enabled *(default for pinmode `2..4`)*</li></ul>`outstate` *(pinmode `5..6`)* = set the default state of an OUTPUT pin on reset/power-up. If your device is configured to save state (`SetOption0 = 1`), the `outstate` setting will be ignored and the last known state of the pin will be applied during power-up/reset.<ul><li>`0/off` = set output pin to OFF</li><li>`1/on` = set output pin state to ON</li><li>`2/toggle` = toggle output pin state</li></ul>`repmode` = reporting mode (optional). Interrupt mode is disabled for pinmode `1` and for output pinmodes (`5..6`)<ul><li>`0` = interrupt using Event and report using telemetry *(default for pinmode `2..4`)*</li><li>`1` = interrupt using Event only (no telemetry reported)</li><li>`2` = report using telemetry only (no Event triggered)</li></ul>
Sensor29<a id="Sensor29"></a>|MCP23008 / MCP23017 I<sup>2</sup>C GPIO Expander configuration<BR>`Reset<x>` = reset all pins<BR>x = `1..6`<BR>`1` = INPUT mode, no reporting, no pull-up<BR>`2` = INPUT mode, report on CHANGE, pull-up enabled<BR>`3` = INPUT mode, report on LOW, pull-up enabled<BR>`4` = INPUT mode, report on HIGH, pull-up enabled<BR>`5` = OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)<BR>`6` = inverted OUTPUT mode (if enabled by `#define USE_MCP230xx_OUTPUT`)<BR><BR>`pin,pinmode{,intpullup\|outstate{,repmode}}`<ul></ul>`pin` = the I/O pin on the MCP230xx chip<ul><li>`0..7` for MCP23008</li><li>`0..15` for the MCP23017)</ul>`pinmode` = operational mode of the pin (`?, 0..5`)<ul><li>`?` = query pin configuration</li><li>`0` = Disabled (deprecated, but will be default for previously unconfigured devices)</li><li>`1` = INPUT (Floating - only telemetry data will be sent according to configuration `TelePeriod` intervals)</li><li>`2` = INPUT with INTERRUPT on CHANGE (will send an MQTT output on state change from LOW to HIGH **and** HIGH to LOW)</li><li>`3` = INPUT with INTERRUPT on CHANGE to **LOW** (will send an MQTT output on state change **only** from HIGH to LOW)</li><li>`4` = INPUT with INTERRUPT on CHANGE to **HIGH** (will send an MQTT output on state change **only** from LOW to HIGH)</li><li>`5` = OUTPUT (if enabled with `#define USE_MCP230xx_OUTPUT`)</li><li>`6` = inverted OUTPUT (if enabled with `#define USE_MCP230xx_OUTPUT`)</li></ul>`intpullup` *(pinmode `1..4`)*. Pull-up resistors are disabled by default for pin mode `1` whilst enabled by default for pin modes `2..4` (because they are interrupt enabled pins and we do not want signal bounce). The internal pull-up on these pins may be disabled if necessary if you are biasing them externally.<ul><li>`0` = weak internal pull-up disabled *(default for pinmode `1`)*</li><li>`1` = weak internal pull-up enabled *(default for pinmode `2..4`)*</li></ul>`outstate` *(pinmode `5..6`)* = set the default state of an OUTPUT pin on reset/power-up. If your device is configured to save state (`SetOption0 = 1`), the `outstate` setting will be ignored and the last known state of the pin will be applied during power-up/reset.<ul><li>`0/off` = set output pin to OFF</li><li>`1/on` = set output pin state to ON</li><li>`2/toggle` = toggle output pin state</li></ul>`repmode` = reporting mode (optional). Applicable only for pinmode `2..4`. Reporting mode is disabled for pinmode `1` and for output pinmodes (`5..6`)<ul><li>`0` = interrupt using Event and report using telemetry *(default)*</li><li>`1` = interrupt using Event only (no telemetry reported)</li><li>`2` = report using telemetry only (no Event triggered)</li></ul>
Examples:
`Sensor29 Reset1`