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
|
speed: 80MHz
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
- id: i2c_main
|
id: i2c_main
|
||||||
sda: 8
|
sda: 8
|
||||||
scl: 9
|
scl: 9
|
||||||
frequency: 400kHz
|
frequency: 400kHz
|
||||||
- id: i2c_battery
|
|
||||||
sda: 40 # Verify these pins are free on your board
|
|
||||||
scl: 41
|
|
||||||
frequency: 400kHz
|
|
||||||
|
|
||||||
# CH422G I/O expander (Waveshare uses it for LCD reset/backlight/touch reset)
|
# CH422G I/O expander (Waveshare uses it for LCD reset/backlight/touch reset)
|
||||||
ch422g:
|
ch422g:
|
||||||
@@ -89,7 +85,7 @@ touchscreen:
|
|||||||
platform: gt911
|
platform: gt911
|
||||||
id: touch_panel
|
id: touch_panel
|
||||||
i2c_id: i2c_main
|
i2c_id: i2c_main
|
||||||
update_interval: 120ms
|
interrupt_pin: 4
|
||||||
reset_pin:
|
reset_pin:
|
||||||
ch422g: ch422g_hub
|
ch422g: ch422g_hub
|
||||||
number: 1
|
number: 1
|
||||||
@@ -141,7 +137,7 @@ font:
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: max17043
|
- platform: max17043
|
||||||
id: max17048_battery
|
id: max17048_battery
|
||||||
i2c_id: i2c_battery
|
i2c_id: i2c_main
|
||||||
update_interval: 120s
|
update_interval: 120s
|
||||||
battery_voltage:
|
battery_voltage:
|
||||||
name: "Remote Battery Voltage"
|
name: "Remote Battery Voltage"
|
||||||
|
|||||||
Reference in New Issue
Block a user