Official Arduino Release with Reef Angel Controllers

Community contributed apps
User avatar
Posts: 2819
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Mon Jan 27, 2020 4:11 pm
We have used a custom build of the Arduino Application for our use with the Reef Angel Controllers. This has worked good in the past, however it has some issues moving forward. Reproducing the build that Roberto does is a bit tedious. Each time a new release of Arduino comes out, we would have to apply the same changes to the new version, then build and release. (I've tried to build it on Mac and Linux and have not had much success. It's always been difficult to repeat the build.)

The webwizard has solved the big problem. This is the method of choice for most users.

Now, on to the point of this post.
For those of us who want to the Arduino application, we now will be able to run the default version that you can download from Arduino. I took some time over the last couple days and figured out how to Add-On our Controllers/Boards to the default boards list AND how to incorporate the Features file generation that was part of the Reef Angel Arduino Build (although you have to manually run it first, before you compile your sketch.)
Updated: The add-on also generates the labels for you based on the lines added to your sketch. It auto-creates the RA_CustomLabels.h file for you each time you run it.

Here's how you can set it up.
  • Add the Controllers
    • Open up Arduino
    • Goto Preferences
    • Look for "Additional Boards Manager URLs" and then click the little window button to open the Add window
    • Add this URL to the list:
      Code: Select all
      (Yes, I'm hosting it on my server)
    • Click Ok to close this window, then click Ok again to close and save the Preferences
    • Goto the Tools menu, select "Board", then "Boards Manager".
    • Search for Reef Angel
    • Click on the Install button listed for the Reef Angel Controllers
  • Add the Features File generation capability
    • Close Arduino
    • Download the tool I created (CBTool) -
      Here's the full URL if you want it:
      Code: Select all

      And the SHA256 sum file as well: sha256 sum
      Code: Select all
    • Unzip / Extract it and place the folder inside the Arduino/libraries/tools/ folder
    • You will now have a folder called CBTool inside the tools folder. Inside the CBTool folder is another folder called tool and inside that will be a file called cbtool.jar.
      Here's the full content:
      Code: Select all

      There's only 1 file total.
    • Launch Arduino again
    • Goto Tools -> CB Reef Angel Process Sketch to run the features and labels generation.

When the Features generation creates the features file, it adds a line at the top to tell when it was generated and for what INO / Sketch file. This can be helpful for those to see when you last generated it (if you even care). It adds the same generated line to the Labels file as well.

You need to run it whenever you make changes to your code that could be adding or removing features. If you are just updating code logic and not changing any features, you might not need to run it again. However, when in doubt, run it.

Updated:I figured out how to get the code to compile after running the the features and labels generation, but have not added the logic to it. The reason is when you goto upload the code, it forces a compilation again. So it takes twice as long to compile and upload.

Lastly, I have only tested compiling my code and it works just fine. I have not had a chance to upload any code (at the time of this post). I will be testing the compilation in the future.
I have also only tested this on a Mac running OS 10.15 (Catalina). In theory, this should work fine on Windows, Mac, and Linux (x86/x64 and arm variants), every version that Arduino puts out, this should work. So please, if you are interested, test this out. I will be testing the arm64 and x64 versions soon.

Let me know if this helps or if you have any questions.

I just finished testing the building and uploading. I tested the uploading using Mac 10.15 (Catalina) using Arduino 1.8.10 and on my Pinebook Pro (32bit arm build) using Arduino 1.8.11 for 32bit arm and I could upload just fine to a Reef Angel Plus. I still haven't tested on a linux x64 but that shouldn't matter at all since the other 2 builds work.
I improved the code creation and generation. I also added in the custom label generation based on the labels in the code. The labels lines MUST begin with
Code: Select all
followed by the label you wish to change. Look at the RA_CustomLabels.h file for more details.
An example line would be:
Code: Select all
Last edited by binder on Wed May 06, 2020 7:12 pm, edited 2 times in total.
Reason: Added update about uploading from different versions and platforms

Return to Apps

Who is online

Users browsing this forum: No registered users and 2 guests