1
0
mirror of https://github.com/esphome/esphome.git synced 2024-12-25 17:07:50 +01:00
esphome/tests/components/wk2168_spi/common.yaml
Jean Louis-Guerin f8cdb087fc
Add the WeiKai SPI/I2C UART/IO Expander components to esphome ()
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-04-24 13:21:44 +12:00

64 lines
1.1 KiB
YAML

spi:
id: spi_bus
clk_pin: ${clk_pin}
mosi_pin: ${mosi_pin}
miso_pin: ${miso_pin}
wk2168_spi:
- id: bridge_spi
cs_pin: ${cs_pin}
spi_id: spi_bus
crystal: 11059200
data_rate: 1MHz
uart:
- id: id0
channel: 0
baud_rate: 115200
stop_bits: 1
parity: none
- id: id1
channel: 1
baud_rate: 115200
- id: id2
channel: 2
baud_rate: 115200
- id: id3
channel: 3
baud_rate: 115200
# individual binary_sensor inputs
binary_sensor:
- platform: gpio
name: "pin_0"
pin:
wk2168_spi: bridge_spi
number: 0
mode:
input: true
- platform: gpio
name: "pin_1"
pin:
wk2168_spi: bridge_spi
number: 1
mode:
input: true
inverted: true
# Individual binary outputs
switch:
- platform: gpio
name: "pin_2"
pin:
wk2168_spi: bridge_spi
number: 2
mode:
output: true
- platform: gpio
name: "pin_3"
pin:
wk2168_spi: bridge_spi
number: 3
mode:
output: true
inverted: true