Editing AndroidArduinoMeetup

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
On June 5th, 2011, an ethusiastic group of more than 40 people gathered here at NoiseBridge for a first-time Android-Adruino Meetup. Pooling our collective technical know-how , we successfully managed to make our Android phones communicate with Arduino hardware.<br>
<br>
<br>
== Intro ==
Our meetup was written up on the MAKE Magazine blog:<br>
<br>
On June 5th, 2011, an enthusiastic group of more than forty people gathered here at NoiseBridge for a new Android-Arduino Meetup. Pooling our collective technical know-how , we successfully managed to make our Android phones communicate with Arduino hardware.<br>
<br>
''And'' our meetup was written up on the MAKE Magazine blog!:<br>
[http://blog.makezine.com/archive/2011/06/using-the-android-open-accessory-api-without-a-nexus.html Using the Android Open Accessory API without a Nexus]<br>
[http://blog.makezine.com/archive/2011/06/using-the-android-open-accessory-api-without-a-nexus.html Using the Android Open Accessory API without a Nexus]<br>
<br>
<br>
Google recently (and officially) added Arduino support to new versions of the Android OS so that hardware development on Android phones is now easy.<br>
Google officially added Arduino support to new versions of the Android OS so that hardware development is easy on Android phones.<br>
<br>
<br>
Arduino hardware that will work with Android phones includes:<br>
Arduino hardware that will work with Android phones includes:<br>
- the Google ADK (Android Development Kit)<br>
- the Google ADK (Android Development Kit)<br>
- a standard Arduino<br>
- a standard Arduino<br>
- any Arduino clone with a USB Host shield<br>
- any Arduino clone with a USB Host shield).<br>
<br>
<br>
[[Image:ADKphoto.jpg|thumb|right|G2 phone controlling Google's ADK hardware, including two motors]]
First, since Arduino support is ''only available on new versions'' of the Android OS, a lot of people, myself included, needed to '''root''' their phones to get a new version of Android OS on them.  We met at one side of the room, where [[User:Rubin110|Rubin]] gave an overview of the process of rooting an Android phone, followed by a hands-on workshop.  I had my phone rooted, installed the latest Android OS (CyanogenMod), and then got my phone to control the Google ADK hardware!  I document my procedure below so others may benefit from my experience.<br>
<br>
<br>
Note: By contrast, a number of other people at the meetup already had phones with versions of the Android OS compatible with Arduino hardwareThese people gathered at the electronics lab area and had their phones connected with Google ADK, standard Arduinos, and other Arduino clones (with USB Host shield).
[[Image:ADKphoto.jpg|thumb|right|G2 phone controlling Google's ADK hardware]]
Since Arduino support is ''only available on new versions'' of the Android OS, a lot of people at the meetup (including me) needed to root their phones to get a new version of Android OS on themWe met at one side of the room, where [[User:Rubin110|Rubin]] gave an overview of the process of rooting one's Android phone, followed by a a workshop of actually doing it.  ''I got my phone rooted, installed the latest Android OS (CyanogenMod), and got my phone to control the Google ADK hardware!  I document my procedure, below, so others may benefit from my experience.''<br>
<br>
<br>
A bunch of other people at the meetup already had phones with Android OS that was ready for hardware.  They gathered at the electronics lab area, and they got their phones connected with Google ADK, standard Arduinos, and other Arduino clones (with USB Host shield).<br>
<br>
<br>
My phone is a new, eight-day-old T-Mobile G2 phone (also known as ''HTC Vision''). It came with a version of Android OS (v2.2) that does not support Arduino hardware (need v2.3.4 or later). So, with the help of [[User:Rubin110|Rubin]] and others, I rooted my phone, and installed the latest version of Cyanogenmod (a fork of the official Android OS).<br>
<br>
<br>
I document the steps I took so that others will have an easier time of it. Your process will probably be similar even if you have a different type of Android phone.<br>
<br>
<br>
 
I have a new (8 day old) T-Mobile G2 phone (also known as ''HTC Vision'').<br>
== Documentation ==
It came with a version of Android OS (v2.2) that does not support Arduino hardware (need 2.3.4 or later).<br>
So, with the help of [[User:Rubin110|Rubin]] and others, I rooted my phone, and installed the latest version of Cyanogenmod (a fork of the official Android OS).<br>
<br>
I attempted to document the steps I went through, so that others can have an easier time of it.<br>
The steps will probably be similar if you have another type of Android phone.<br>
<br>
<br>
'''Here is the documentation:<br>'''<br>
<br>
This entire process took me 3 hours.<br>
<br>
<br>
This entire process took me 3 hours, but it will take you less time if you have a more recent version of Android as explained above.<br>
<br>
<br>
The procedure is mostly given at:<br>
The procedure is mostly given at:<br>
[http://wiki.cyanogenmod.com/index.php?title=TMobile_G2:_Rooting T-Mobile G2 Rooting]<br>
[http://wiki.cyanogenmod.com/index.php?title=TMobile_G2:_Rooting T-Mobile G2 Rooting]<br>
I will not reproduce everything here, but I'll provide a few notes that are very helpful to know.<br>
I will not reproduce everything here, but there are a few notes that I'll give that are very helpful to know.<br>
<br>
<br>
<br>
Here are some other additional, useful resources:<br>
Here are some other resources (which I did not use, but may be helpful):<br>
wiki.cyanogen.com<br>
wiki.cyanogen.com<br>
forms.cyanogen.com<br>
forms.cyanogen.com<br>
Line 40: Line 44:
IRC -- freenode:  #cyanogenmod<br>
IRC -- freenode:  #cyanogenmod<br>
IRC -- freenode:  #noisebridge<br>
IRC -- freenode:  #noisebridge<br>
<br>
<br>
<br>
<br>
<br>
'''Steps I took to get Cyanogen on my G2:'''<br>
'''Steps I took to get Cyanogen on my G2:'''<br>
Line 45: Line 52:
Basically, follow the instructions here:<br>
Basically, follow the instructions here:<br>
http://wiki.cyanogenmod.com/index.php?title=TMobile_G2:_Rooting<br>
http://wiki.cyanogenmod.com/index.php?title=TMobile_G2:_Rooting<br>
Again, I am mostly just giving helpful notes below, not reproducing the entire procedure.<br>
I am mostly just giving helpful notes, below, and not reproducing the entire procedure.<br>
<br>
<br>
<br>
<br>
<br>
''The first step is to backup you phone.''
The first step is to backup you phone.
<br>
<br>
<br>
<br>
The next step is to get temporary root access.<br>
The next step is to get temporary root access.<br>
The main thing here is to ''get ADB running''.  One way to do this is by installing the Android SDK on your computer.  Since wireless access at Noisebridge was overloaded with so many people using it at once, and since Miloh had the foresight to download the Android SDK for Windows, MacOS, and Linux, I downloaded the Windows version (yes, I use Windows) from Miloh’s account on Pony:<br>
The first thing here is to get ADB running.  One way to do this is by installing the Android SDK on your computer.  Since the wireless at Noisebridge was overloaded with so many people using it at once, and since Miloh had the foresight to download the Android SDK for Windows, MacOS, and Linux, I downloaded the Windows version (yes, I use Windows) from Miloh’s account on Pony:<br>
http://developer.android.com/sdk/index.html<br>
http://developer.android.com/sdk/index.html<br>
''installer_r11-windows.exe''<br>
''installer_r11-windows.exe''<br>
<br>
<br>
But to be able to install the Android SDK, it is necessary to have the Java Development Kit running on your computer (the JRE alone is not sufficient). Download and install JDK on your computer:<br>
<br>
But to be able to install the Android SDK, it is necessary to have Java Development Kit running on your computer (JRE is not good enough).<br>
Downlowd and install JDK on my computer:<br>
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html<br>
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html<br>
''jdk-6u25-windows-i586.exe''<br>
''jdk-6u25-windows-i586.exe''<br>
<br>
<br>
Then double-click to install the Android SDK, BUT THERE IS A BUG in the installer: When it says that JDK is needed and it can’t be found, press BACK, and then press NEXT again, and it will proceed fine from there.<br>
<br>
Then double-click to install the Android SDK, BUT THERE IS A BUG in the installer:<br>
When it says that JDK is needed and it can’t be found, hit BACK, and then hit NEXT again, and it will go OK from there.<br>
<br>
<br>
<br>
Then I followed the instructions in this Android SDK guide on how to install the Android SDK on my computer:<br>
Then I followed the instructions in this Android SDK guide on how to install the Android SDK on my computer:<br>
http://wiki.cyanogenmod.com/index.php?title=Howto:_Install_the_Android_SDK<br>
http://wiki.cyanogenmod.com/index.php?title=Howto:_Install_the_Android_SDK<br>
<br>
<br>
As part of installing the Android SDK, when I connected my phone to my computer, after installing everything, the ADB driver was not installed correctly.  So, per the guide's instructions, I had to continue with further steps to update the ADB driver. This worked fine for me.<br>
As part of installing the Android SDK -- when I connected my phone to my computer, after installing everything, ADB driver was not installed correctly.  So, as in the guide's instructions, I had to continue with further instructions to update the ADB driver. This worked fine for me.<br>
<br>
<br>
<br>
(Back to the instructions for G2 Rooting.)<br>
Back to the instructions for G2 Rooting.<br>
<br>
<br>
Continue to follow instructions to gain temporary root access on the phone.<br>
Continue to follow instructions to gain temporary root access on the phone.<br>
<br>
<br>
Next we move on to gain permanent root access on the phone (with the added bonus of unlocking the phone!). Since the first gfree suggested (v0.04) gave me an error about failing to power cycle the eMMC, I had to use gfree v0.02. gfree v0.02 worked fine.<br>
<br>
<br>
I did not flash the Engineering Hboot (stated as optional in the G2 Rooting instructions).<br>
Next we move on to gain permanent root access on the phone (which has the bonus of unlocking the phone).<br>
I had to use gfree v0.02, since the first gfree suggested (v0.04) gave me the error about failing to power cycle the eMMC (gfree_02 worked fine).<br>
<br>
<br>
I did not flash the Engineering Hboot (which is stated as optional in the G2 Rooting instructions).<br>
<br>
<br>
Continue with intructions for Install a Custom Recovery Image.<br>
<br>
<br>
Continue with intructions for Installing a Custom Recovery Image.<br>
<br>
<br>
Continue with instructions for Flashing a Radio.<br>
Continue with instructions for Flashing a Radio.<br>
<br>
<br>
Now continue with instructions for Flashing CyanogenMod:<br>
<br>
Continue with instructions for Flashing CyanogenMod:<br>
After downloading the ROM Manager free version, it turns out that I couldn’t download the Cyanogenmod nightlies, which are the latest versions (need paid version or ROM Manager to get latest versions -- ugh), so I used the "second method" in the instructions, and downloaded the latest nightly on my computer, then transferred to G2:<br>
After downloading the ROM Manager free version, it turns out that I couldn’t download the Cyanogenmod nightlies, which are the latest versions (need paid version or ROM Manager to get latest versions -- ugh), so I used the "second method" in the instructions, and downloaded the latest nightly on my computer, then transferred to G2:<br>
http://download.cyanogenmod.com/?device=vision<br>
http://download.cyanogenmod.com/?device=vision<br>
''cm_cision_full-98.zip''<br>
''cm_cision_full-98.zip''<br>
<br>
<br>
Due to legal reasons, there are a bunch of free Google Android apps that are not allowed to come with CyanogenMod.  You can download these (including Android Market) and transfer them to the phone.  The package I downloaded and transferred to my phone:<br>
Because of legal reasons, there are a bunch of free Google Android apps that are not allowed to come with CyanogenMod.  You can download these (including Android Market) and transer them to the phone.  The package I downloaded and transferred to my phone:<br>
''CyanogenMod 7''<br>
''CyanogenMod 7''<br>
<br>
<br>
Note:  When transferring files to the phone, it is fine to transfer zipped files.<br>
NOTE:  When transferring files to phone, it is fine to transfer the zipped files.<br>
<br>
<br>
Unhook the phone and then go back to instructions using Second Version.<br>
Unhook phone, and then go back to instructions using Second Version.<br>
<br>
<br>
Using ROM Manager, install cm_vision_full-98.zip
Using ROM Manager, install cm_vision_full-98.zip
After reboot, it ignored instructions we gave it about backups, so when we get a screen full of orange text (Clockwork Flash Recovery), we did the following:<br>
After reboot, it ignored instructions we gave it about backups, so when we get a screen full of orange text (Clockwork Flash Recovery), and did the following:<br>
- Backup and restore (to backup entire OS) (takes a while)<br>
- Backup and restore (to backup entire OS) (takes awhile)<br>
- Wipe data/factory reset<br>
- Wipe data/factory reset<br>
- Wipe cache partition<br>
- Wipe cache partition<br>
Line 101: Line 121:
- Reboot system<br>
- Reboot system<br>
<br>
<br>
If things falter at this point, I will have a bricked phone.  If things do go well, I should get the CyanogenMod logo animation boot screen.  What will happen? . . . <br>
<br>
If things do not go well at this point, I will have a bricked phone.  If things go well, I should get CyanogenMod logo animation boot screen.  What will happen? . . . <br>
SUCCESS!!  --  Though it took a couple of minutes watching the static HTC screen, the CyanogenMod logo animation came up, and my phone works great!<br>
SUCCESS!!  --  Though it took a couple of minutes watching the static HTC screen, the CyanogenMod logo animation came up, and my phone works great!<br>
<br>
<br>
<br>
'''Then I installed the Google ADK software on my G2.'''<br>
'''Then I installed the Google ADK software on my G2.'''<br>
Line 113: Line 135:
SUCCESS!!  I can now control the ADK hardware with my phone:<br>
SUCCESS!!  I can now control the ADK hardware with my phone:<br>
- Light up the three RGB LEDs any color I like.<br>
- Light up the three RGB LEDs any color I like.<br>
- Power the three servo motors.<br>
- Move the three servo motors.<br>
- Turn the two relays on and off.<br>
- Turn the two relays on and off.<br>
- Read the temperature sensor.<br>
- Read the temperature sensor.<br>
- Read the joystick position.<br>
- Read the joystick position.<br>
<br>
<br>
I can't wait to play with this more!<br>
I can't wait to play with this more.<br>
<br>
<br>
<br>
Additional info: There is a visually-oriented programming language for easily creating your own Android apps called App Inventor.  Here is a fun intro to it:<br>
There is a visually oriented programming language for very easily creating your own Android apps -- called App Inventor.  Here is a fun intro to it:<br>
[http://appinventor.googlelabs.com/about/ http://appinventor.googlelabs.com/about/]<br>
[http://appinventor.googlelabs.com/about/ http://appinventor.googlelabs.com/about/]<br>
I haven't used it, but I will...<br>
I haven't used it, but I will...<br>
<br>
<br>
<br>
<br>
<br>
[[User:Malman23|Mitch]].<br>
[[User:Malman23|Mitch]].<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Line 142: Line 174:




A couple of weeks ago Google announced Android interconnectivity with Arduino, paving the way for a cheap, easy-to-use hardware development platform.  Google then created the ADK (Android Development Kit, based on Arduino), which is not cheap -- but they gave a bunch away for free at the Maker Faire last weekend.<br>  
A couple of weeks ago Google announced the ability for Android to connect with Arduino to be used as a cheap, easy-to-use hardware development platform.  Google then created ADK (Android Development Kit, based on Arduino), which is not cheap -- but they gave a bunch away for free at the Maker Faire last weekend.<br>  
[http://developer.android.com/guide/topics/usb/adk.html info on Android website]<br>
[http://developer.android.com/guide/topics/usb/adk.html info on Android website]<br>
and<br>
and<br>
Line 148: Line 180:


   
   
Since many of us are relatively clueless on how to hack Android phones or how to connect them to Arduino to do cool things, a bunch of us are getting together next Sunday to put our collective heads together and make Arduino work on our Android phones.
Since many of us are relatively clueless on how to hack Android phones, or how to connect them to Arduino to do cool things, a bunch of us are getting together next Sunday to put our collective heads together to see how to make it all work on our Android phones.


   
   
Please note that all contributions to Noisebridge are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Noisebridge:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)