Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Serial port Rs232 arduino问题_Serial Port_Arduino_Serial Communication_Ttl - Fatal编程技术网

Serial port Rs232 arduino问题

Serial port Rs232 arduino问题,serial-port,arduino,serial-communication,ttl,Serial Port,Arduino,Serial Communication,Ttl,我对arduino uno有点困惑。我使用串行打印(“hi”)代码,然后在串行监视器上显示“hi”。我还使用rs232/ttl转换器,它们正确连接arduino上的引脚1和0。 然后我意识到,当serial.print(“hi”)首先处理数据时,数据是通过usb电缆传输的。但我希望数据必须通过tx rx引脚,即1和0。 但是,当我从串行监视器输入一些数据时,rs232/ttl将工作,并发送一些数据? 我不了解情况 为什么会这样?我只想使用rs232/ttl转换器从引脚1和0发送数据。 我该怎么做

我对arduino uno有点困惑。我使用串行打印(“hi”)代码,然后在串行监视器上显示“hi”。我还使用rs232/ttl转换器,它们正确连接arduino上的引脚1和0。 然后我意识到,当serial.print(“hi”)首先处理数据时,数据是通过usb电缆传输的。但我希望数据必须通过tx rx引脚,即1和0。 但是,当我从串行监视器输入一些数据时,rs232/ttl将工作,并发送一些数据? 我不了解情况

为什么会这样?我只想使用rs232/ttl转换器从引脚1和0发送数据。
我该怎么做?我不使用usb电缆发送数据。

如果您在默认usb端口下看到数据从电脑进出,则您使用的是插脚0和1。 如果您正确地连接了一个扩展会话,您应该能够完全读取相同的内容,如果没有,则连接是错误的。典型错误是切换TX和RX,因为它们必须交叉


还请记住,RS232不支持多个主机,但如果“其他主机”正在读取,通常不会出现问题,因为它们只会嗅探连接。

但信息仍会进入usb串行端口,而不是插脚1和0。我只想在串行监视器上说“hi”时,它也会出现在rx tx引脚上。但事实并非如此。Arduino仅从usb电缆发送数据。使用串行平均值使用引脚0和1。然后,这些引脚与板载连接器连接,并连接至USB。如果你不相信我,就去看看arduino的原理图,它们是开源的!如果在引脚0和1上看不到数据,则表示探针未正确连接,操作系统使用了错误的连接。你的连接是什么?您是否尝试过交叉发送和接收?