Arduino Library Ready to Use

Discussion forum for the CAN-FIX protocol. This is a CANBus based communications protocol specifically suited for experimental aviation.

Moderators: John Nicol, birkelbach

Post Reply
birkelbach
Posts: 193
Joined: 04 Sep 2012, 14:42

Arduino Library Ready to Use

Post by birkelbach »

I finally have the Arduino library functional. So far it complies with the mandatory portion of the specification, or at least the current draft. It's assumes that you are using the Arduino shield that we've already talked about. See viewtopic.php?f=24&t=159. The library is not a proper Arduino library at this point. To use it in your own project at this point you'd have to put it in the sketchbook directory with your sketch. This makes development of the library easier but I'll eventually convert it into a proper library. Right now I suspect folks will just modify the sketch that's there. We'll get the library done soon enough.

The code is on GitHub... https://github.com/birkelbach/CAN-FIX-ArduinoLib.

Right now all it does is send the ambient temperature as the Static Temperature (ID 0x407). I connected an LM34 temperature sensor to AN0 on the Arduino. It'll respond to ID requests, node and bitrate set messages and if you disable ID 0x407 it'll stop sending the temperature. I'll try to spend some time over the weekend writing some documentation.

There are a couple of issues with it at the moment. First, the two way channel communication is not implemented. Next, it doesn't do any real managing of the transmit buffers. It basically puts a frame in each of the three transmit buffers in the MCP2515 and if all three are full it blocks until one is free. If you need to build a node that has to send the frame immediately even if the transmit buffers are full then we'll have to change how this works a little bit. I'm sure there are more issues. If you find any please post an issue to the GitHub repository or post it here and we'll get it fixed.
Phil Birkelbach
Waller, Texas
RV-7 727WB
www.myrv7.com
User avatar
John Nicol
Posts: 611
Joined: 23 Nov 2011, 12:17
Contact:

Re: Arduino Library Ready to Use

Post by John Nicol »

Awesome!
-----
John Nicol
Founder, MakerPlane
Post Reply