@@ -378,15 +378,19 @@ It is particularly suitable for Raspberry Pi and similar single-board computers.
378378
379379**Parameters**:
380380
381- | Parameter | Type | Required | Description |
382- | --------- | ------ | -------- | ---------------------------------------- |
383- | function | string | yes | Mode : ` read` (input) or `write` (output) |
384- | pin | int | yes | Pin number (BCM numbering, e.g. GPIO 17) |
381+ | Parameter | Type | Required | Description |
382+ | --------- | ------ | -------- | ------------------------------------------------------------------ |
383+ | function | string | yes | Mode : ` read` (input) or `write` (output) |
384+ | pin | int | yes | Pin number (BCM numbering, e.g. GPIO 17) |
385+ | activelow | bool | no | If `true`, pin will be `true` when at 0 V and `false` at VCC. |
386+ | chip | string | no | GPIO device (default : ` gpiochip0` ) |
385387
386388**How it works**:
387389
388- - **Reading** (`function: read`): Reads the state of a GPIO pin as a boolean value (`true` = HIGH, `false` = LOW)
389- - **Writing** (`function: write`): Sets a GPIO pin to HIGH (`true`) or LOW (`false`)
390+ - **Reading** (`function: read`): Reads the state of a GPIO pin as a boolean
391+ value (`true` = HIGH, `false` = LOW, and the other way around if `activelow` is set)
392+ - **Writing** (`function: write`): Sets a GPIO pin to HIGH (`true`) or LOW
393+ (`false`), and vice-versa if `activelow`
390394
391395Pin numbering follows the BCM scheme (Broadcom numbers, not the physical pin position).
392396For a Raspberry Pi pinout, see e.g. [pinout.xyz](https://pinout.xyz/).
@@ -408,7 +412,7 @@ pin: 27 # BCM pin number
408412` ` `
409413
410414:::note
411- This plugin only works on Linux systems with access to `/dev/gpiomem `.
415+ This plugin only works on Linux systems with access to `/dev/gpiochip0 `.
412416:: :
413417
414418# ## Go <Tag label="read" category="read" /> <Tag label="write" category="write" /> {#go}
0 commit comments