您好,欢迎访问代理记账网站
  • 价格透明
  • 信息保密
  • 进度掌控
  • 售后无忧

jetsonnano与esp8266串口通信 cutecom和minicom使用

用urb线。
上代码:

import serial as ser
se=ser.Serial("/dev/ttyUSB0",115200,timeout=1)
se.write(“1”.encode())
1

se.write(“0”.encode())
1

se.write(“1”.encode())
1

import serial as ser
se=ser.Serial("/dev/ttyTHS1",115200,timeout=1)
se.write("1".encode())

命令:

ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 4月 20 02:37 /dev/ttyUSB0

ls -l /dev/ttyS*
crw–w---- 1 root tty 4, 64 4月 19 13:56 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 4月 19 13:57 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 4月 19 13:57 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 4月 19 13:57 /dev/ttyS3
ls -l /dev/ttyTH*
crwxrwxrwx 1 root tty 238, 1 4月 20 02:30 /dev/ttyTHS1
crw-rw---- 1 root dialout 238, 2 4月 19 13:56 /dev/ttyTHS2
dmesg | grep ttyS*
[ 1.044023] console [ttyS0] disabled
[ 1.044120] 70006000.serial: ttyS0 at MMIO 0x70006000 (irq = 63, base_baud = 25500000) is a Tegra
[ 1.044230] console [ttyS0] enabled
[ 1.045183] 70006040.serial: ttyTHS1 at MMIO 0x70006040 (irq = 64, base_baud = 0) is a TEGRA_UART
[ 1.045561] 70006200.serial: ttyTHS2 at MMIO 0x70006200 (irq = 65, base_baud = 0) is a TEGRA_UART
[ 6.106957] usb 1-2.4: ch341-uart converter now attached to ttyUSB0
[ 36.176037] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 85.318975] usb 1-2.4: ch341-uart converter now attached to ttyUSB0
[ 398.416093] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 398.667390] usb 1-2.4: ch341-uart converter now attached to ttyUSB0
[ 495.440008] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 3356.740326] usb 1-2.4: ch341-uart converter now attached to ttyUSB0
[12633.424098] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
cutecom:
sudo apt-get install cutecom

sudo cutecom
sudo minicom


分享:

低价透明

统一报价,无隐形消费

金牌服务

一对一专属顾问7*24小时金牌服务

信息保密

个人信息安全有保障

售后无忧

服务出问题客服经理全程跟进