Wednesday, 1 December 2010

Arduino + canbus + megasquirt = win.



Well few weeks ago I had another look at getting my arduino and an mcp2515 to play nice, not knowing where to start I had a search to see if anyone had made a lib that was easy to understand and found canduino.

Had a play with that and after a few emails back and forth to the owner I had some response from the 2515 Yay!

The next task was to configure the chip to receive messages so after reading the datasheet and the megasquirt can docs 500 times I got a response from the MS2.

After Some more tweeks to the code and plenty of head scratching I set one of my MS2 ecus to can id 1 and connected it to the arduino, switched em both on and hey presto the buffer full led lit up and , some data values were in the serial monitor :)

Now the code is a bit scruffy and getto but its working so far, I need to do some more reading on how to request the rest of the data but its a result.

Few pics of the setup as it is.


more soon!