Is it possible to connect more devices to one bus uart line?
So how is this possible with i2c?
Is a pullup resistor needed on RX and TX?
I want to connect a pm1006 from ikea and a mhz-19 CO2 sensor to one line, is this possible?
Thanks
Is it possible to connect more devices to one bus uart line?
So how is this possible with i2c?
Is a pullup resistor needed on RX and TX?
I want to connect a pm1006 from ikea and a mhz-19 CO2 sensor to one line, is this possible?
Thanks
A UART is not a bus, it’s a point to point link.
Because I2C is an addressable bidirectional bus.
No.
No.
Well thank you. Then it is necessary to define 2 separate uarts.
uart:
- id: uart2
rx_pin: "$uart2_rx_pin"
tx_pin: "uart2_tx_pin"
baud_rate: 9600
- id: uart1
rx_pin: "$uart_rx_pin"
tx_pin: "$uart_tx_pin"
baud_rate: 9600
sensor:
#-------------------------------------------
# CO2 sensor - MHZ19
#-------------------------------------------
- platform: mhz19
co2:
name: "${friendly_name} CO2"
temperature:
name: "${friendly_name} Temperature CO2"
update_interval: "never"
automatic_baseline_calibration: true
uart_id: uart1
id: mhz19_co2
#-------------------------------------------
# IKEA VINDRIKTNING Particulate Matter Sensor with PM1006 inside
# pm 2.5
#-------------------------------------------
- platform: pm1006
pm_2_5:
name: "${friendly_name} PM2.5"
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 3
update_interval: 320s
uart_id: uart2
It is correct?
You will need two separate UARTs, yes.
I don’t know how to define them in ESPHome, I don’t use it.