Ok, so I like to give credit where credit is due. With that in mind I want to give a shout out to the Bluetooth Mate from Sparkfun and to Amarino. If it were not for these two dear friends I would probably be pulling my hair out right now, while stressing out because of all the other projects that would be feeling neglected and begging for my attention.
Over the coming week I still need to edit both my Arduino and Android sketches to make sure that these devices are able to send and receive the appropriate data. I also plan on using the Android phone to do some GPS logging. Now let me tell you a bit more about the Bluetooth Mate and Amarino:
The Bluetooth Mate, which I received last week, had been unfairly judged as a snobby high-priced component that was actually making me feel stupid for having spent so much money when I could have gone with the $20 option. However, what I soon found out was that this component makes up for its high price by being willing to play nice with other devices such as computers and cell phones. This meant that I was able to avoid hours and hours of stress that often associated to configuring bluetooth transmitters.
Now let me shower some praise on the Amarino. Amarino is comprised of two libraries, one for the Arduino and the other for the Android. Together these two resources make it much easier for you to establish communications between the Arduino and Android. That is not to say that this process is easy – some understanding of how to code for Android is still required to customize the code samples available on the Amarino site. You also have to know a little bit about how to use the terminal so that you can install the Amarino application on your Android phone. Below I’ve included some important tricks that I learned.
In order to install Amarino on your Android phone you need to add the path to thr tools folder from the Android SDK to your PATH. Supposedly this can be done by creating a file called .bash_profile that includes this path, and then saving this file to your home directory. However, I had to take a different approach for this to work on my computer – I had to edit the file called paths directly from using the Terminal application. This is how this is done:
- Launch the Terminal application
- Open the paths file using the following command: “sudo pico /etc/paths”
- Add the path to this file (do not change any of the other paths)
- Press Ctrl-X to exit the text editor
- Confirm that you want to save the file by pressing “y”
- Press return one last time to exit the editor (I know it’s repetitive)
- Exit the Terminal program
- Open the Terminal application
- Type the following command: “echo $PATH”
- Confirm that the appropriate path has been added