Step by Step Guide – Setting up your PIXEL Development Environment for Android
The Android development environment is very powerful. However, it may be a little daunting to set-up initially, especially if you have no prior experience with Android development or with the Eclipse IDE. Fear not the threatening red cross icons. Most problems are common and easy to work-around, and once you manage to build you project correctly once, the rest of the development is smooth.
Step 1. Install the Eclipse development environment + the Android Developer Tools (ADT) on your local computer.
Step 2. From Eclipse, click “Window” and “Android SDK Manager”. Download the Android 2.3.3 (API 10).
Step 3. Install Git if you don’t already have Git installed. Git is a web based revision control system. Here’s a good beginner’s guide for those new to Git.
Step 4. From a command line, change to a directory where you’d like to download the PIXEL SDK and type:
git clone https://github.com/alinke/ioio.git
Step 5. Issue this Git command to change from the master branch to the pixelv3 branch. This is very important, make sure you do not skip this step. IMPORTANT: Use the board_v2.5 branch, not the main or rgb-led branch.
cd ioio
git checkout board_v2.5
Step 6. Import these three libraries into Eclipse: IOIOLib, IOIOLibBT, and IOIOLibAccessory which you’ll find in the \software folder.
Import the “IOIOLib” library first.
Right click on the newly imported library, choose “Properties”, choose “Android” and select “Google APIs – Platform 2.3.3 – API Level 10”
Now repeat for the IOIOLibBT library
Right click the newly imported library, choose “Properties” and “Android”. You’ll probably see an error message. Click the library in the bottom of the screen and click “Remove”. Then click “Add” and add the “IOIOLibAndroid” library to this library.
Now import the last library “IOIOLibAccessory”
Also be sure that “Google APIs – Platform 2.3.3 – API Level 10” is checked.
Step 7. Make sure the three libraries you just imported don’t have any Eclipse errors. If no errors, then move on and download the PIXEL HelloWorld sample code. Go back to a command line and change folders to the original parent folder and then issue this Git command:
git clone https://github.com/alinke/PixelHelloWorld.git
Now import the “PIXEL HelloWorld” project into Eclipse.
After importing into Eclipse, there will be errors.
To clear these errors, right click on “PixelHelloWorld”, choose “Properties”, and then “Android”. You’ll just need to re-link the three libraries to clear the errors.
First click the “Remove” button and remove each library
Now click the “Add” button and add each library.
Make sure also that “Google APIs – Platform 2.3.3 – API Level 10” is checked.
Now all the errors should be cleared but if not, then also do a “Project”, “Clean” from Eclipse. If still getting errors after the project clean, refer to this Eclipse troubleshooting guide.
This simple code does nothing more than display an image of an apple onto PIXEL. After you’ve mastered this example, then move on and have a look at the source code of the existing PIXEL apps which you’ll find on github.
Turn on PIXEL and Bluetooth pair PIXEL to your Android device using pairing code: 4545. Then install the PIXEL HelloWorld app on your Android device and you should then see an apple displayed on PIXEL.