树梅派串口配置记忆:
1、关闭蓝牙: sudo systemctl disable hciuart
2、开启串口功能:sudo raspi-config -> 5 Interfacing Options -> P6 Serial ->Enable
3、恢复串口使用:在 /boot/config.txt 文件中添加 dtoverlay=pi3-miniuart-bt
6、关闭串口控制台:修改 /boot/cmdline.txt 内容为 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline ....
7、安装串口测试工具: sudo apt-get install minicom
8、配置串口: sudo minicom -s -> Serial port setup->A Serial Device: /dev/ttyAMA0 -> Save setup as df1
9、更新并重启系统:sudo apt-get update sudo apt-get upgrade sudo reboot now
原文地址:https://www.cnblogs.com/btxz/p/9678806.html
时间: 2024-11-12 21:36:15