Testing out flashing onto macchina
- Macchina is based on Arduino due. Followed the steps along the Guide given. The guide was pretty much self explanatory. If everything goes well, and you upload the example sketch, a blue led glows for every 1 second.
- To Verify, Go to libraries (/Users/gokulakrishnanm/Library/) via Command + Shift + G (Go to folder command)
- /Users/gokulakrishnanm/Library/ is the location of the libraries file.
- Go into Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/
- These are the libraries installed along with Macchina package.
- Download the Collins repo
- Remove the -master suffix and paste them to Documents/Arduino/libraries/
Making changes to libraries that come along with macchina
- Go /Users/gokulakrishnanm/Library/Arduino15/packages/macchina/hardware/sam/0.2.1/libraries/
- Replace due_can, due_wire, mcp2515 with Collins version of due_can , due_wire , mcp2515
As per Collins comment :
“I just put a binary updater for M2RET onto savvycan.com as well. This version should give you three working buses if used with the newest binary of SavvyCAN — two CAN, one single wire CAN. I’ve tested to be able to both read and write to single wire CAN with this new version. Word of caution for anyone trying to compile M2RET now — I’ve changed the MCP2515 library an awful lot. It now can use a common API with due_can so that you can write a sketch that works across any of the three buses with the exact same function calls. That’s handy but I did it by creating a third library “can_common” that due_can and mcp2515 now inherit from. That means you need can_common and you need the new version of both due_can and mcp2515 as well. And, you need my versions of all of those because it is not pushed to the Macchina repo and won’t be until everyone is sure that it’s a good idea to do that.”
3. Add can_common as mentioned along with other libraries
Verify and Uploading to M2
- Fire up Arduino IDE, goto File -> Examples -> M2RET and upload the M2RET.ino
Testing with Savvycan
- Open up savvy can.
- If everything was successful, you will see the below screen
Will be testing M2 in upcoming weeks with Savvycan.