Not sure if this is the best place to discuss this, but I thought I would semi-document something we discussed in an github issue (https://github.com/ROBOTIS-GIT/OpenCR/issues/91). That is a reasonable way to work with the current Open CR sources.
What I was doing before was to copy over all of the sources from the develop branch (or my current sub-branch) over the version I installed using the standard way that is then created in the Arduino15 drectory…
This Worked OK, but then I had to remember to update that directory and if I made changes had to remember to copy those changes back to my github install…
What I am trying now, is to have two versions of the OpenCR in the the Arduino boards type menu. The main one that was installed using the default instructions: http://emanual.robotis.com/docs/en/parts/controller/opencr10/#arduino-ide
I then have my fork of the OpenCr (https://github.com/KurtE/OpenCR) which I cloned down to d:\github\OpenCR, which if I am not making any changes I typically leave in the branch (develop) and I routinely update my fork with the contents of the official develop fork.
Not sure if anyone cares about this part, but I have a batch file to sync my develop branch: syncopencr.bat
d: cd cd \GitHub\OpenCR git fetch upstream git checkout develop git reset --hard upstream/develop git push origin develop --force c:
I ran this from a command window. Warning it can be dangerous, as if you try to run this with a bunch of outstanding changes it will clobber them.
Again side note: If I am making any changes, I will create a new branch that is derived from this one to do my changes in. This new branch is the branch that I then issue any Pull Requests from.
But now back to the subject of this posting. How to use this copy of the OpenCR sources in Arduino.
What I have done is to, go to my Arduino Sketch folder, and if you don’t already have a Hardware directory, create it. In my case it is: c:\Users\kurte\documents\Arduino\hardware
I then create a new directory: opencr
In this directory, I create a symbolic link in this directory:
opencr -> [D:\GitHub\OpenCR\arduino\opencr_arduino\opencr]
Note: as you can probably tell I am doing this under Windows (actually windows 10 64 bit current version).
For this I use the command mklink:
That is I believe the command I did while I had a command prompt (might need administrator version) was:
mklink /D opencr D:\GitHub\OpenCR\arduino\opencr_arduino\opencr
I have not tried it, but there are similar commands in Linux and on the MAC for the same thing.
Then I restarted the Arduino IDE, and if I then go to the tools->Board menu OpenCR will show up in two places. The one is using your normal Arduino Install and the other will use the current sources. Note: It actually appears to use the default installs tools, but the files are coming from the current stuff.
To make it more obvious to me which one is which, I edited the boards.txt file in my copy of the OpenCR develop branch and changed the name:
So now the current sources version shows up with the updated name.
Again not sure if anyone else is interested in this, but thought I would document what I have done.