- 安装canopen
pip3 install canopen
- 安装pyserial
pip3 install pyserial
警告:The scripts pyserial-miniterm and pyserial-ports are installed in ‘/home/debian/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
- 配置CAN引脚
config-pin p9.19 can
config-pin p9.20 can
- 查询引脚功能
config-pin -q p9.19
config-pin -q p9.20
- 自动
- 自动启动can0
- open_can.sh
#!/bin/shell
ip link set can0 up type can bitrate 500000
ifconfig can0 up