Clarification for MCP23017 (#1854)

This commit is contained in:
H. Árkosi Róbert 2022-01-26 21:14:17 +01:00 committed by GitHub
parent 0469882912
commit 7e29fa2891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 5 deletions

View File

@ -146,6 +146,9 @@ pins for your projects. Within ESPHome they emulate a real internal GPIO pin
and can therefore be used with many of ESPHome's components such as the GPIO
binary sensor or GPIO switch.
GPIO pins in the datasheet are labelled A0 to A7 and B0 to B7, these are mapped
consecutively in this component to numbers from 0 to 15.
.. code-block:: yaml
# Example configuration entry
@ -156,10 +159,10 @@ binary sensor or GPIO switch.
# Individual outputs
switch:
- platform: gpio
name: "MCP23017 Pin #0"
name: "MCP23017 Pin A0"
pin:
mcp23xxx: mcp23017_hub
# Use pin number 0
# Use pin A0
number: 0
mode:
output: true
@ -168,11 +171,11 @@ binary sensor or GPIO switch.
# Individual inputs
binary_sensor:
- platform: gpio
name: "MCP23017 Pin #1"
name: "MCP23017 Pin B7"
pin:
mcp23xxx: mcp23017_hub
# Use pin number 1
number: 1
# Use pin B7
number: 15
# One of INPUT or INPUT_PULLUP
mode:
input: true