diff --git a/i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx b/i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx index 8211995ca..3a00969d0 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx @@ -378,15 +378,20 @@ It is particularly suitable for Raspberry Pi and similar single-board computers. **Parameters**: -| Parameter | Type | Required | Description | -| --------- | ------ | -------- | ---------------------------------------- | -| function | string | yes | Mode: `read` (input) or `write` (output) | -| pin | int | yes | Pin number (BCM numbering, e.g. GPIO 17) | +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ------------------------------------------------------------------ | +| function | string | yes | Mode: `read` (input) or `write` (output) | +| pin | int | yes | Pin number (BCM numbering, e.g. GPIO 17) | +| activelow | bool | no | If `true`, pin will be `true` when at 0 V and `false` at VCC. | +| bias | string | no | `as-is`, `disabled`, `pull-up` (default for `read`), `pull-down` | +| chip | string | no | GPIO device (default: `gpiochip0`) | **How it works**: -- **Reading** (`function: read`): Reads the state of a GPIO pin as a boolean value (`true` = HIGH, `false` = LOW) -- **Writing** (`function: write`): Sets a GPIO pin to HIGH (`true`) or LOW (`false`) +- **Reading** (`function: read`): Reads the state of a GPIO pin as a boolean + value (`true` = HIGH, `false` = LOW, and the other way around if `activelow` is set) +- **Writing** (`function: write`): Sets a GPIO pin to HIGH (`true`) or LOW + (`false`), and vice-versa if `activelow` Pin numbering follows the BCM scheme (Broadcom numbers, not the physical pin position). For a Raspberry Pi pinout, see e.g. [pinout.xyz](https://pinout.xyz/). @@ -399,6 +404,11 @@ function: read pin: 17 # BCM pin number ``` +:::note +For legacy reasons the default is active high *with internal pullup resistor*, +which means if you don't connect anything to the pin, it will be `1` aka `true`. +::: + **Writing Example**: ```yaml @@ -408,7 +418,7 @@ pin: 27 # BCM pin number ``` :::note -This plugin only works on Linux systems with access to `/dev/gpiomem`. +This plugin only works on Linux systems with access to `/dev/gpiochip0`. ::: ### Go {#go}