B4J Code Snippet Canbus code

Canbus is a industrial protocol, mainly known in automotive industry. All lights, windows etc are Canbus driven in a modern car. Therefore each car has a OBD connector for readout/programming car's computer.

For these reason a lot of chips are on the market, easy to find on ebay.
I use the CAN for Homeautomation. It's fast speed and reliability and proven stability is much better for alarms etc.
Included the code for interfacing the can pcb which can be bought on ebay to the raspberry.
For the hardware side please follow this link https://www.raspberrypi.org/forums/viewtopic.php?t=141052

For reading the OBD message a higher layer has to be written. In fact this code is Layer2, the interface to get the bytes out of the MCP2515 into the pi.

The code has been checked for some time now and is stable.
 

Attachments

  • can.bas
    21.1 KB · Views: 262
Top