HAL driver for CANopen stack for Machinekit

This is the first post in a series about the development of a HAL driver for CANopen for Machinekit.

I've been talking/skyping/mailing with Michael for quite some time now about CAN. And in the meantime a lot of interesting folks have expressed interest in using CAN devices (and other industrial busses) with Machinekit. So for Machinekit to get some more "industrial" traction this would be a very welcome addition.

The nice thing is that the BeagleBone Black already has a CAN interface, so it's (almost) ready to talk to CAN devices if you look at the hardware side. I say almost because you need to hook up a line driver chip to the pins.

This will be a series of posts which mark my progress on the learning curve. I'm a mechanical engineer interested in automation, open source and Machinekit. I'm not a hacker-god breathing code, so this project will come in bits and pieces. Between projects i'll probably do a lot of brushing up on C, a lot of reading regarding CAN and absorbing knowledge regarding Linux, debugging and probably more.

Recently I wrote a delayline component (which can delay an arbitrary samples of an arbitrary type for an arbitrary time) in C, and that was the first "real" thing I wrote in C other than some "hello world" tutorial stuff. More info if you're interested in the issue, the PR and the manpage. Writing that was a lot of fun, really bumped my experience and it was a really satisfying experience. I intend to keep that vibe with the HAL driver for the CANopen stack.

One thing I'll really try to do is to keep the docs up to date with the progress. Then I can give people a "prrroper bollocking" (I learned that one in Scotland) when they don't document stuff :-) .

First results are the links to developing for CAN and setting up for SocketCAN ... Note that these are working documents.

Interested in following? then have a look at Issue #589 which will serve as a collecting bin.

Feel free to leave a reply!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.