In one of my Arduino projects I need to communicate using a Can bus. I have found, and ordered, some interesting hardware dealing with the Can Bus, Can Bed and Serial Can Module. Arduino libs exists for both but I have problems with creating B4R libs. Any help much appreciated!
I'd not write a library, the library CANBed allows to poll devices. You can directly call C++ to ask for data present or send a packet. The effort to write a wrapper is useless, in my opinion.
do you want to test both wrapper ?
for Serial_CAN, wrapper it don't manage events, you have to run "begin" first and to make a loop waiting for data like in Arduino.
for MCP_CAN, after a modification on original cpp file, i was able to compile example project in Arduino and i was able to make a wrapper with event management
i cannot test both because i don't have hardware but compilation and B4X interface seems OK