mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-23 21:51:53 +01:00
Clarification for MCP23017 (#1854)
This commit is contained in:
parent
0469882912
commit
7e29fa2891
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user