Thank you. This seems to me like a smart way to assign serial numbers/addresses to switches. Why didn't I think of that myself? Because I'm not smartIt could be fairly easy to daisy chain some Picos using their UARTs. Tx from one Pico goes to Rx of next and Tx of last Pico goes to the Pi. No need for sending in the other direction if it's just reporting switch state changes.
Each Pico could easily handle 20 switches, maybe 25. On switch state change the Pico could send the message "00nnOn" or "00nnOff" where nn is the switch number. For the daisy chain it would listen to UART and add one to the "00" prefix so those messages would be "01nnOn" or "01nnOff". The next Pico would change that to "02nnOn" and so on. Eventually the Pi would receive a message with the first two digits identifying the Pico and the next two the switch number. Only three wires needed between each unit - Ground, 5V and data.

Statistics: Posted by elrkoxo — Sun Nov 17, 2024 7:16 pm