C/C++ Question Need help with these Can Bus libraries!

tcr49

Member
Licensed User
Longtime User
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!
 

Attachments

  • CANBed-master.zip
    20.6 KB · Views: 579
  • Serial_CAN_Arduino-master.zip
    12.1 KB · Views: 581

tigrot

Well-Known Member
Licensed User
Longtime User
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.
 

tcr49

Member
Licensed User
Longtime User
Thanks tigrot for the quick response. How about the other library 'Serial Can Module'? Is it possible with the same technique using that lib?
 

candide

Active Member
Licensed User
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

good luck!
 

Attachments

  • rSerial_CAN_module.zip
    11.1 KB · Views: 572
  • rMCP_CAN.zip
    30 KB · Views: 517
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…