Code Yaml :
web_server:
#ESP32 --- Rotary Encoder
#GND --- GND
#3V3 --- +
#D19 --- SW
#D18 --- CLK
#D5 --- DT
binary_sensor:
#Rotary Button
#https://home-assistant-guide.com/guide/how-to-use-a-physical-switch-or-button-in-esphome-with-gpio-binary-sensor/
- platform: gpio
id: joystick_click
pin:
number: GPIO19
mode: INPUT_PULLUP
inverted: True
name: "Joystick click"
#Rotary Encoder
sensor:
- platform: rotary_encoder
name: "Rotary Encoder"
pin_a: GPIO18 #CLK
pin_b: GPIO5 #DT
0:00 Présentation
0:38 Branchements
0:56 Le bouton
1:25 Le potentiomètre
2:03 Les options