Editing AndroidArduinoMeetup
Jump to navigation
Jump to search
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> | ||
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 | 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> | ||
<br> | <br> | ||
[[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 them. We 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> | ||
<br> | <br> | ||
<br> | <br> | ||
I have a new (8 day old) T-Mobile G2 phone (also known as ''HTC Vision'').<br> | |||
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> | ||
<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 | 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 | 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> | ||
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. | |||
<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 | 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 | <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, | <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 | 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> | |||
<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> | ||
<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> | ||
<br> | <br> | ||
Continue with instructions for Flashing a Radio.<br> | Continue with instructions for Flashing a Radio.<br> | ||
<br> | <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> | ||
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 phone, it is fine to transfer the zipped files.<br> | |||
<br> | <br> | ||
Unhook | 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), | 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 | - 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 | <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> | ||
- | - 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 | I can't wait to play with this more.<br> | ||
<br> | |||
<br> | <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 | 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 | 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. | ||