python-can

Creating a csv file with measurement data and meta data in the first line

Creating a csv file with measurement data and meta data in the first line Question: I want to save measurement data I receive via the CAN bus in a csv file. Apart from the measurement data I want to also store some meta data I need to convert the measurement data I receive via CAN. …

Total answers: 1

Concurrency issue data corruption asyncio python-can locking/queues – nested dictionaries

Concurrency issue data corruption asyncio python-can locking/queues – nested dictionaries Question: I am at the end of a very long journey… Here is the long story if you are interested. https://github.com/hardbyte/python-can/issues/1336 Sorry for the incredibly long code snippet but I am not sure where I am going wrong so I thought more is more. The …

Total answers: 2

Close bus in python-can

Close bus in python-can Question: I am using python-can to send CAN messages like this: import can bus2 = can.interface.Bus(bustype=’pcan’, channel=’PCAN_USBBUS1′, bitrate=500000) msg = can.Message( arbitration_id=0x42, data=[0, 25, 0, 1, 3, 1, 4, 1], is_extended_id=False ) bus2.send(msg) The script works fine, but when I run it for a 2nd time, it results in an error, …

Total answers: 2

Can't get python-can-viewer to run

Can't get python-can-viewer to run Question: I want to use python to read a can-bus and later on going to send messages on the bus via python(I’m a total python newbie, but have knowledge in C and C++). So I started with installing the python-can module via pip. First thing I wanted to try is …

Total answers: 1