Refactor I2C configuration by consolidating to a single main I2C bus and updating battery sensor to use it
This commit is contained in:
@@ -3,14 +3,10 @@ psram:
|
||||
speed: 80MHz
|
||||
|
||||
i2c:
|
||||
- id: i2c_main
|
||||
sda: 8
|
||||
scl: 9
|
||||
frequency: 400kHz
|
||||
- id: i2c_battery
|
||||
sda: 40 # Verify these pins are free on your board
|
||||
scl: 41
|
||||
frequency: 400kHz
|
||||
id: i2c_main
|
||||
sda: 8
|
||||
scl: 9
|
||||
frequency: 400kHz
|
||||
|
||||
# CH422G I/O expander (Waveshare uses it for LCD reset/backlight/touch reset)
|
||||
ch422g:
|
||||
@@ -89,7 +85,7 @@ touchscreen:
|
||||
platform: gt911
|
||||
id: touch_panel
|
||||
i2c_id: i2c_main
|
||||
update_interval: 120ms
|
||||
interrupt_pin: 4
|
||||
reset_pin:
|
||||
ch422g: ch422g_hub
|
||||
number: 1
|
||||
@@ -141,7 +137,7 @@ font:
|
||||
sensor:
|
||||
- platform: max17043
|
||||
id: max17048_battery
|
||||
i2c_id: i2c_battery
|
||||
i2c_id: i2c_main
|
||||
update_interval: 120s
|
||||
battery_voltage:
|
||||
name: "Remote Battery Voltage"
|
||||
|
||||
Reference in New Issue
Block a user