Install


Tip: When moving an extracted folder, make sure that you are moving the folder containing the files, not just a folder that contains another folder called the same thing.


A video tutorial for the following instructions can be found in the Video Tutorial section of this page.

Arduino

The Cube is programmed using the Arduino toolset. It is likely that you will have already setup the Arduino environment, but you will require additional libraries.

IDE

The Arduino IDE is used to create sketches that are uploaded to the cube. BlueCube has been tested on version 1.6.5 to 1.6.7, but should work on other versions.

  1. Visit the Arduino IDE Download Page, and download the latest version available for your operating system
  2. Click "Just Download"
  3. Once the download is complete, drag the "Arduino" application into the Applications folder
  4. Double click on "Arduino" from the Applications folder
  5. Select "Open" on the dialog that asks you if you are sure you want to open it
  6. Select "Arduino" "Preferences" and note the "Sketchbook Location"
  7. Close the preferences window by clicking "Cancel"
  8. Quit "Arduino"
  9. Once downloaded, run the installer
    1. Click "Yes" to allow this the "User Account Control" "Do you want to allow this app to install software on your PC?" dialog
    2. Click "I Agree" to the license agreement
    3. Accept the defaults to be installed, and click "Next"
    4. Accept the default installation folder, and click "Install"
    5. Click "Install" on the window asking you if you wish to install the USB driver
    6. Click "Install" on the window asking you to install the second USB driver
    7. Click "Close
  10. Start the "Arduino" application, either from the icon on the desktop, or from the Start Menu
  11. Select "File" "Preferences" and note the "Sketchbook Location"
  12. Close the preferences window by clicking "Cancel"
  13. Quit "Arduino"

Freetronics Board Profile (Optional)

While not specifically required, installing the board profile (and driver) makes working with the cube easier.

  1. Download the latest LeoStick (which is the basis of the cube) board profile from here
  2. Unzip the file
  3. Browse to the "Sketchbook Location" that was determined above (typically "Documents" "Arduino") and create a new folder in it called "hardware"
  4. Move the "LeoStickBoardProfile-master" folder that was extracted at step 2 into the new "hardware" folder

Additionally there is a driver for Windows that while not required on Windows 10, will help identify the cube. To install the driver:-

  1. Download it from here, and extract the ZIP
  2. Right click on "FreetronicsUSBv22" and click "Install"
  3. Click "Open" on the dialog asking whether to "open this file?"
    1. Click "Yes" to allow this the "User Account Control" "Do you want to allow this app to install software on your PC?" dialog
  4. Click "Install" when asked "would you like to install this device software?"
  5. Click "OK" when the "Operation completed successfully" screen is shown

Cube4 Library

BlueCube utilises features from my fork of the Cube4 Library. If you have the Freetronics version installed, you will need to replace it my version. The new library is a drop in replacement for the Freetronics version.


The cube library provides the API that is used for instructing the cube to preform different actions. Please follow the instructions on the download page to get a copy.

  1. Unzip the "Cube4-#.#.zip" file that was previously downloaded (where #.# is the version number)
  2. Browse to the "Sketchbook Location" that was determined above (typically "Documents" "Arduino") and create a new folder in it called "libraries" (if it doesn't already exist)
  3. Move the unzipped "Cube4-#.#" folder that was extracted in step 1 into the libraries folder from step 2
  4. Rename the folder to "Cube4"

Cube4_ARUtils Library

The Cube4_ARUtils library provides helper functions for my sketches when interacting with the cube. Please follow the instructions on the download page to get a copy.

  1. Unzip the "Cube4_ARUtils-#.#.#.zip" file that was previously downloaded (where #.#.# is the version number)
  2. Move the unzipped "Cube4_ARUtils-#.#.#" folder that was extracted above into your "Sketchbook Location" "libraries" folder that was determined above (typically "Documents" "Arduino" "libraries")
  3. Rename the folder to "Cube4_ARUtils"

Adafruit BluefriutLE_nRF51 Library

The Adafruit BluefriutLE_nRF51 library allows the cube to communicate with the Bluetooth module. Please follow the instructions on the download page to get a copy.

  1. Unzip the "Adafruit_BluefruitLE_nRF51-#.#.#.zip" file that was previously downloaded (where #.#.# is the version number)
  2. Move the unzipped "Adafruit_BluefruitLE_nRF51-#.#.#" folder that was extracted above into your "Sketchbook Location" "libraries" folder that was determined above (typically "Documents" "Arduino" "libraries")
  3. Rename the folder to "Adafruit_BluefruitLE_nRF51"

BlueCube Sketch

The BlueCube Sketch is the code that is run on the cube that understands how to communicate with the Bluetooth module, and receive instructions from the mobile apps. Please follow the instructions on the download page to get a copy.

Additionally, ensure that the steps on the wiring page have been followed.

  1. Unzip the "BlueCube-#.#.#.zip" file that was previously downloaded (where #.#.# is the version number)
  2. Within the extracted folder, browse Arduino BlueCube
  3. Double click on "BlueCube.ino"
  4. Ensure that your cube is connected to your computer via USB cable
  5. From the "Tools" "Board" menu, select "Freetronics LeoStick" if available, otherwise select "Arduino Leonardo"
  6. From the "Tools" "Port" menu, select the port that your cube is connected to
  7. Upload the sketch to your cube

Congratulations, you should now be ready to use the apps, to remotely control your cube.

If you get any errors, ensure that the libraries have been correctly installed (goto "Sketch" "Include Library" "Manage Libraries..." and check that Cube4, Cube4_ARUtils, change "Type" to "Installed" and check that "Cube4", "Cube4_ARUtils", and "Adafruit BluefruitLE nR51" are all installed), and that you have selected the correct board and ports.


Video Tutorial

Mac Install Tutorial

Windows Install Tutorial