Note that the 1.5.8 version of the Arduino IDE has introduced some changes to their standard C++ libraries which are not backwards compatible. Until we figure out how to work with both at the same time, please download the 1.5.7 version of the IDE:
If you’d rather upload binaries directly, please see this post. If you want to tweak and play, then you’ll need to set up the IDE. This page explains how to do that in a few steps.
You will need an nw2s::b which is based on the Arduino Due SAM microprocessor. If you are brave, this code will run on a bare Arduino Due, but you will want to make a few changes as the code does rely on a couple of peripherals to be in place and won’t run very well without them.
To program the Arduino, you will need the current BETA (1.5) version of the Arduino IDE which is downloadable from arduino.cc.
Set up codebase
You can download the most recent release from the releases folder. Unzip it and put it in a convenient location. Use the root as your IDE’s sketchbook directory for easy access (In the Preferences menu).
If you don’t want to use (or find) your IDE’s root folder, you can always create one in a more convenient location and specify that in your preferences.
The rest of the tutorials don’t require that you understand much in the way of C or C++, but you will need to know the basics of writing a sketch and uploading it to your device. If you feel comfortable with this, then continue to the first tutorial. Otherwise, read up a little on the Arduino site.
Connecting to the ‘b the first time
You can connect to your ‘b using either Bluetooth or USB. USB is the easiest, so lets start with that. It will help get you oriented with the process, and is always available as a fallback for programming. The USB programming process is built into the hardware whereas the Bluetooth programming process is dependent on the nw2s::b code which may or may not be configured properly once you get to writing your own sketches.
Connect your computer to the Arduino’s programming port using a micro USB cable. The programming port is the USB cable closest to the power connector. If you have a low profile USB cable or plenty of room in your case, then you’ll be able to leave the USB connected while the ‘b is in your case. I do this and run the USB through an empty 1HP space in the bottom row.
In the ‘b circuit, the Arduino is powered directly from the +12 bus. When the USB is connected and the +12 bus is not powered, the Arduino will get power from the USB bus. Unfortunately, the arduino will also place the USB power onto the +12 bus. This means that you’ll be powering all of your +12V modules with your USB’s +5V. For this reason, you should always disconnect the USB when your enclosure is powered down.
When the Arduino is connected, you can select the port and board in the IDE menu Tools->Port and Tools->Board options.
Tuning and Testing
If you are building a kit, you’ll want to run through the test process first. These tests will ensure that all of the features are working as the should and that the output levels are calibrated to a common set of references. The tuning process is outlined in Step 3 of the assembly instructions.
Uploading a sketch
If you are testing out a new assembled unit, then you can now upload a sketch. One of the better candidates to start with is bAlanesqueDemo. It’s running a version of code not unlike some of the looped random voltage generators out there. And it’s got lots of blinky lights and good patchable points.
Then click the upload button and you should see the progress as the program is uploaded. (This screenshot is from a smaller test program)