I have a problem compiling a piece of code that I copied right off the 74HC595 documentation page:
esphome:
name: esphome-web-2fe91c
friendly_name: ESP32WROOM-Licht14
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "b2gHYVp8V4sUOscpEdJzw718DFLBy34Z5kP5nRrz1j0="
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-2Fe91C"
password: "SfqTpbv5GbM6"
captive_portal:
sn74hc595:
- id: 'sn74hc595_hub'
data_pin: D5 #naar SER
clock_pin: D8 #naar SRCLK
latch_pin: D7 #
oe_pin: D6
sr_count: 1
switch:
- platform: gpio
name: "OUT 04"
id: OUT04
pin:
sn74hc595: sn74hc595_hub
number: 3
inverted: false
In the editor the first section is already marked with the red waves for errors and when compliling I got the following error:
INFO ESPHome 2023.11.6
INFO Reading configuration /config/esphome/esphome-web-2fe91c.yaml...
Failed config
sn74hc595: [source /config/esphome/esphome-web-2fe91c.yaml:33]
Either "data_pin" and "clock_pin" must be set or "spi_id" must be set.
- id: sn74hc595_hub
data_pin: D5
clock_pin: D8
latch_pin: D7
oe_pin: D6
sr_count: 1
Any clue what I’m doing wrong?
Additional question:
Can 75HC595 be used as imput, e.g. for binary sensors?
Thanks for any help