I've got both a MHZ-19 CO2 sensor (connected to A6 using PWM mode) and a PMS5003 particulate sensor (connected via UART) on the same expansion board.
I'd love to switch over to using this UART implementation for the MHZ-19 but of course that will probably not play well with my PMS5003 which is already using the UART. So I'm opening this issue to discuss ways to potentially use both at the same time. Here are the ideas I have so far:
Timer-driven software serial (both of these devices are only 9600, so shouldn't need super precise timing) -- I haven't seen anything like this for the Flipper, but I've written these for other platforms in the past.
Add a hardware UART mux chip
Add transistors to control power to each device (maybe not ideal since I think the MHZ-19 has a warmup time)
Add a ESP32 as a wifi dev board device, but also modify its firmware to also act as a uart mux (ESP32s have 4 hardware UARTs IIRC)
What do you think the best route forward would be?
I've got both a MHZ-19 CO2 sensor (connected to A6 using PWM mode) and a PMS5003 particulate sensor (connected via UART) on the same expansion board.
I'd love to switch over to using this UART implementation for the MHZ-19 but of course that will probably not play well with my PMS5003 which is already using the UART. So I'm opening this issue to discuss ways to potentially use both at the same time. Here are the ideas I have so far:
What do you think the best route forward would be?