Skip to main content
Tweeted twitter.com/StackRaspi/status/961836636240662528
Fixed some grammatical issues
Source Link

I have two devices I want to use (GPS module and a PM2.5 sensor) that both use serial communication. I know you can't throw two devices on the same serial line. I know thatHowever, I've seen some badly explained serial communication using the USB ports has resourcesexamples and I'm still not 100% certain.

If I take one module and connect it to the TX/RX pins in the GPIO area, then can I hook the other one through a USB port? Furthermore, could I accomplish this by constructing two serial objects using the wiringPi serial class?

I have two devices I want to use (GPS module and a PM2.5 sensor) that both use serial communication. I know you can't throw two devices on the same serial line. I know that serial communication using the USB ports has resources and I'm still not 100% certain.

If I take one module and connect it to the TX/RX pins in the GPIO area, then can I hook the other one through a USB port? Furthermore, could I accomplish this by constructing two serial objects using the wiringPi serial class?

I have two devices I want to use (GPS module and a PM2.5 sensor) that both use serial communication. I know you can't throw two devices on the same serial line. However, I've seen some badly explained serial communication using the USB ports examples and I'm still not 100% certain.

If I take one module and connect it to the TX/RX pins in the GPIO area, then can I hook the other one through a USB port? Furthermore, could I accomplish this by constructing two serial objects using the wiringPi serial class?

Source Link

Can I use the TX/RX pins and the USB ports for multiple serial devices?

I have two devices I want to use (GPS module and a PM2.5 sensor) that both use serial communication. I know you can't throw two devices on the same serial line. I know that serial communication using the USB ports has resources and I'm still not 100% certain.

If I take one module and connect it to the TX/RX pins in the GPIO area, then can I hook the other one through a USB port? Furthermore, could I accomplish this by constructing two serial objects using the wiringPi serial class?