连接raspberry pi上的多个设备 [英] Connect multiple devices on raspberry pi

查看:116
本文介绍了连接raspberry pi上的多个设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GPIO端口(在raspberry pi上)是否可用于串行通信?或者,我们如何在Rasberry pi的单个RX和TX上连接多个设备进行同步通信?



编辑:我有两个设备,一个GPS模块和一个GPRS / GSM模块连接,都使用RX和TX与Pi通信。 GPRS模块有SDA SCL引脚,我可以连接到Pi,但我没有获得设备地址(使用命令i2cdetect -y 1)。 GPS模块只有TX和RX引脚,我必须连接到Pi的RX和TX。

解决方案

从理论上讲,是的,但是你不想进入这么多麻烦 - 它们不是为此而设计的。组织这种沟通将非常困难。如果您了解GPIO是什么,您将理解它: https://en.wikipedia.org/wiki/General-purpose_input /输出 [ ^ ]。



对于通信,使用USB或以太网。在你有一些其他设备(GSP,调制解调器,任何东西)仍然使用RS-232线路,你可以使用其中一个适配器产品。



-SA

Do GPIO ports (on raspberry pi) can be used for serial communication? or, how we can connect multiple devices for simultaneous communication on single RX and TX of raspberry pi?

Edit: I have two devices, a GPS module and a GPRS/GSM module to connect, both uses RX and TX to communicate with Pi. GPRS module has SDA SCL pins that I can connect to Pi, but I am not getting the device address (using command i2cdetect -y 1). GPS module has TX and RX pins only which I have to connect to Pi's RX and TX.

解决方案

Theoretically speaking, yes, but you won't want to get into so much trouble — they are not designed for this purpose. It would be quite difficult to organize such communication. You will understand it if you understand what GPIO is: https://en.wikipedia.org/wiki/General-purpose_input/output[^].

For communications, USB or Ethernet is used. In you have some other device (GSP, modem, anything) which still uses something line RS-232, you can use one of the adapter products.

—SA


这篇关于连接raspberry pi上的多个设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆