Arduino UNO and the Google ADK – part III

Preparing the Arduino The Arduino firmware is a simple program receiving a toggle LED command from the connected Android device. Some parts are taken from the USB Host Shield 2.0 library. Connect the USB Host Shield 2.0 to the Arduino UNO (note that the picture above does not show the connected host shield, but it will [...]

Tags: , , ,

Arduino UNO and the Google ADK – part II

Getting into detail The Android application is a  simple demo that toggles a LED connected to the accessory (the Arduino UNO). The Android code can be found under the java directory in the source git: git clone git://github.com/joekickass/Arduino-Uno-Android-Accessory.git Below I will highlight parts of the code. Most of the information given can be found in the [...]

Tags: , , ,

Arduino UNO and the Google ADK – part I

This is the first post in a serie describing how to get started with the Google ADK using an Arduino UNO and the Circuits@Home USB host shield. The title of the post actually lies a bit, because we will not use niether the ADK board nor the ADK software provided by Google, since the ADK software only works on [...]

Tags: , , ,

Using RenamingDelegatingContext to mock ContentResolver in Android

Mocking Context Testing in Android can be complex, especially when your component is not isolated from the Android framework. One example of this is when your component is performing file system tasks using Context. E.g, the Activity class has the following methods (inherited from Context): openOrCreateDatabase(); deleteDatabase(); getDatabasePath(); openFileInput(); openFileOutput(); getFileStreamPath(); deleteFile(); getCacheDir(); When calling [...]

Tags: ,

Arduino on Ubuntu without IDE

This is a small post on how to set up your Arduino development environment without using the crappy Arduino IDE. The setup uses an Arduino Uno. The current version of Ubuntu (at this time it is Ubuntu 11.04) offers the latest version of the Arduino library through the Universe repository. This means that installation is as simple as [...]

Tags: ,