in this Instructable I want to show you, how you can program your Arduino with your Android device. It is very simple and cheap. Also it allows us to program our Arduino where ever we want, this is usefull for permanently installed Arduino boards, like in light controllers...

So lets get started! :)

Step 1: Materials and Tools


A USB-A to USB-B cable ( http://www.amazon.de/AmazonBasics-USB-2-0-Kabel-A-... )

A USB-Host cable (OTG cable) ( http://www.amazon.de/USB-OTG-Adapterkabel-Adapter-... )

An Arduino( http://de.farnell.com/ )

1 LED (for testing)

A Android device with Android 4.0.0+ (or with host aviability)


ArduinoDroid or

ArduinoCommander from the Google Play store

<p>i have a few old android devices kicking around, i plan to connect one and see what happens. you have a touch screen, accelerometer, GPS, compass, many built in sensors on just your average smart phone. could be a powerful combination. thanks for posting and fueling the fires of imagination :-)</p>
<p>That Idea is awesome, I guess i have to try it too! I think compiling apps with Processing and combine that would also be great!</p>
<p>there is a processing app in the google playstore. (why they ever changed it from the Android Market, i have no idea ;-) )</p><p>an update, i did connect my android device successfully to an UNO, a Micro, and a 3.3 volt ProMini thru an FTDI cable. they all worked flawlessly.</p><p>i can't stand going thru TSA security, so i leave as much stuff home as possible, especially my laptop. i bring a RPi and a few other gadgets to keep busy, and now, thanks in part to your instructable, i have one more toy to play with and still leave my laptop behind!</p>
<p>Youre welcome :p</p><p>I didnt know, that there is a Processing app, sounds awesome.</p><p>I meant the Android Compiler in the newest version of Processing, I already compiled a few apps for my mobile phone, they all work great!</p>
<p>To not drain power from phone, get one of these:</p><p><a href="http://routerboard.com/5VUSB" rel="nofollow">http://routerboard.com/5VUSB</a></p><p>plus 5V 2A supply.</p>
<p>Awesome, Thank you!! :)</p>
<p>Works great, awesome! This helps a lot in changing values during competitions.</p>
<p>Nice! :)</p>
<p>Now you can <a href="http://www.mastfun4u.com/2015/09/flash-tablet-at-home-free-tablet-struck.html" rel="nofollow">flash android at home</a>.</p><p>I made these steps to ease the friends</p>
<p>hi, I'm trying to get my hudl to run arduino board but dosent seem to connect or recognise its existence-any clues/hints?</p>
<p>Hi, does the Hudl has usb otg (usb host) ? Its requiered to upload stuff to the Arduino</p>
Arduino Droid is gd app but now and next time is upload to error why ?
<p>Hi, did you unplug and plug the board in again, it seems like the Arduino is not responding...</p>
<p>Ok I have a bit of a problem with my arduino because its a clone with CH340G chip.</p><p>I need a suitable driver for android, do you know about any? Thanks for replies</p>
Hi, have you solved your problem? I'm in the same situation with my dcduino, i cannot upload to board...
Hi, I still haven't solved my problem :(
<p>Damn!!!</p><p>I'm trying android driver for ch340 that i've found <a href="http://www.wch.cn/download/CH341SER_ANDROID_ZIP.html" rel="nofollow">here</a> but at the moment I haven't solved too...</p>
<p>No, sorry, I dont know any drivers for android, doesnt it work with Arduino Droid?</p>
Sch&ouml;ne L&ouml;sung, danke f&uuml;r das Tutorial.
<p>can i use it with Arduino Due? if so, can i make the phone get the readings of a sensors and manipulate it as i want??</p>
<p>Not by now, but it is planned</p>
<p>Hi, is it possible to upload sketch in ArduinoDroid through Bluetooth? </p>
<p>No, just via USB-OTG</p>
<p>:-)<br>&quot;Sofortly&quot;, you must be German :-)<br><br>nevertheless, nifty instructable</p>
<p>*late comment incoming* Thankies, I replaced it with the right term ;)</p>
<p>hehe, yes i&acute;m German :)</p><p>Thanks! :)</p>
<p>if I use the arduino mega adk r3, how to connect android to arduino using usb?</p><p>please help me. Thanks</p>
<p>scroll up and read my Instructable ;)</p>
<p>It's a common mistake/misunderstanding about the LED connection to pin13. As a rule, never EVER connect an LED directly to ANY pin of Arduino, otherwise the microcontroller of your board may be killed.<br>There is NO resistor on Pin13 (meanwhile the on-board Pin13 LED has its own). If you put a single red LED, forward current may goes up to the maximum current of USB hosting device (your android phone or your computer). First scenario is not serious (as a phone/tablet has a very limited current capability), but with a pc, it may be almost 1 A (1000 mA). An Atmel microcontroller is limited to 400 mA overall current, a maximum of 40 mA on each pin, meanwhile 20 mA recommended to prevent overheat. If you put a simple LED on any pin without a resistor in line (serial connection), it may be driven by over 400 mA. Not a good idea.</p>
<p>pin 13 has a current limit of 20mA, this pin was made to connect a led directly :)</p>
<p>on all arduino board? i use mega2560. </p>
<p>I guess so</p>
Take a look at the schematics:<br>http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf<br><br>Take a look at the datasheet:<br>http://www.atmel.com/Images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf<br>29.1. Absolute maximum ratings<br><br>It's your decision to brick your controller and/or LEDs.<br><br>Note: pins on the microcontroller are not constant current outputs, yet none of them are protected to overcurrent.
<p>each pin has an internal resistor which can be enabled; see digitalwrite() second parameter.</p><p>Also see &quot;input and output&quot; under <a href="http://arduino.cc/en/Main/arduinoBoardUno" rel="nofollow">http://arduino.cc/en/Main/arduinoBoardUno</a></p><p>the official Uno has this covered. In any case, your cautioning users to use a resistor explicitly is good practice and ok especially as they may further explore electronics without the Arduino, build their own board, etc.</p>
<p>Yep. They're called pull-up resistors and should be used when the digital pin is set as input (normal pin state). But they have no any effect when pin is set as output. See description:</p><p><a href="http://arduino.cc/en/Reference/DigitalWrite" rel="nofollow">http://arduino.cc/en/Reference/DigitalWrite</a></p><p>and</p><p><a href="http://arduino.cc/en/Reference/Constants" rel="nofollow">http://arduino.cc/en/Reference/Constants</a></p><p>And the above mentioned datasheet of Atmel controllers (see digital I/O diagram).</p><p>I write it agan, it's your decision to brick your controller and/or LEDs.</p>
<p>I connect leds to I/O pins on 5v powered atmegas without limiting resistors and have never damaged a chip. Often even more than one at a time. So it's not going to &quot;brick&quot; your atmega328p because of the current limiting characteristic of the port which provides a max of 40ma. I wouldn't implement a final product without the limiting resistors but just for quick and easy testing it is not going to hurt anything. I have done it a lot over several years too, not just once or twice.</p>
<p>this apps have serial monitor? i want to see sensor value</p>
<p>Enjoy ;)</p>
If your android device doesn't supports USB Host mode or OTG, you can make it into USB Host mode by following this steps:<br><br>STEP 1 : First you should root your android device.<br>For this find specific instructions for your model from such websites as The Unlockr.com and XDA developer forums to root your device.<br><br>STEP 2 : Once rooted,install Stick Mount app a free app from Google play store.<br><br>STEP 3 : Now connect the OTG cable ,Arduino. Check 'use by default' and tap ok when Android pops up a prompt that says 'open StickMount when this USB device is connected'.<br><br>After your device successfully mounts ,you will see a notification from StickMount that displays a message like 'Activate mounts: /sda/usbStorage/sda1' to let you know that your USB device is ready for reading or writing.<br><br>Note :( I'm not responsible for any problems /damages while rooting or using this method.Do it at your own risk)<br>
<p>Awesome, Thank you! Didnt know about this possibility!</p>
Does it work with any otg cable? I everything up with the otg cable and the USB a to b. I hooked it up to a moto e running on kitkat 4.4.4. I didn't download the app yet. But the arduino didn't turn on(the built in LEDs didn't turn on). Is it a problem w my otg cable? Or do I need the app first?
<p>Which device do you have, sometimes, they dont have an OTG mode or they dont turn it on... There is only 1 type of OTG kable, so that should work...</p>
I have the moto e. it isn't a tablet but it should work with a phone right?
<p>Yea, most new phones have OTG, but sadly the Moto E doesnt support otg :/</p>
that's to bad, thanks for helping me
<p>I&acute;m realy sorry, that it doesnt work for you :(</p>
I wish I could do this on a iPhone :( but cool inscrutable.
<p>Thank you, I will try to find an app for that :)</p>
<p>Hi, i have tried both applications, with Arduino UNO R3 and Arduino Mega 2560, and nothing works, arduino boards are not detected on the apps, my phone is compatible with USB OTG cable, because i can use some USB devices, such as USB flas drives, Joystick and a mouse, and my USB OTG cable have an auxiliary USB connector for power. I have sent an email for the creator of these apps, and he said to check troubleshooting page, and i did, but it didn't help. Can anyone help me? Thank you!</p>
<p>Hi, which phone and and which cables do you use, can you take some photos? :)</p>

About This Instructable


1,080 favorites


More by Jan_Henrik: How to 3D-Print multicolored obejcts Photography How to make a diffusor for your LED Matrix
Add instructable to: