CAN模块python 3

2024-04-29 13:56:53 发布

您现在位置:Python中文网/ 问答频道 /正文

我最近购买了一块使用CAN模块的PICAN2板

import CAN
bus = CAN.interface.Bus(channel='can0', bustype='socketcan_native')
msg = CAN.Message(arbitration_id=0x13C, data=[0,25,1,3,1,4,1]
bus.send(msg)

我的错误:AtributeError:“module”对象没有属性“interface”


Tags: 模块importmessagechannelmsgcaninterfacenative