Picture of Program your Arduino with an Android device!


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! :)

Remove these adsRemove these ads by Signing Up

Step 1: Materials and Tools

Picture of Materials and Tools


A USB-A to USB-B cable ( )

A USB-Host cable (OTG cable) ( )

An Arduino( )

1 LED (for testing)

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


ArduinoDroid or

ArduinoCommander from the Google Play store

Step 2: The USB-Host cable

Picture of The USB-Host cable

Such a USB-Host cable is basicaly just a USB cable, but just with a few changed resistors in the mikro USB plug. The internal resistors let the Android device activate the USB-Host mode, in this mode you can also use USB-Sticks or other usb applications on the device. That is very useful, now you could plug a usb-printer in.

The problem is now, that every USB device which you plug in, will now run on the energy of your device, what realy can bring the akku down.

Step 3: Connections

Picture of Connections

This step is very simple and doesn´t require much text. Just plug the USB-A to USB-B cable into the female USB of the Host cable. Then plug the USB-B plug into the Arduino and the Mikro USB into the Android device.

Step 4: Arduino power up

Picture of Arduino power up

Now it should look like the connections on the picture. Also your Arduino should now power up and load the last code you uploaded. On my Arduino was the Blink sketch. If it doesn´t power up, check connections.

1-40 of 70Next »
dwfunk44751 year ago

To not drain power from phone, get one of these:

plus 5V 2A supply.

Jan_Henrik (author)  dwfunk44751 year ago

Awesome, Thank you!! :)

ASCAS made it!1 year ago

Works great, awesome! This helps a lot in changing values during competitions.

Jan_Henrik (author)  ASCAS1 year ago

Nice! :)

ochâtelain18 days ago
Schöne Lösung, danke für das Tutorial.
barbarossa7893 months ago

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??

Jan_Henrik (author)  barbarossa7893 months ago

Not by now, but it is planned

MrSlehofer.3 months ago

Ok I have a bit of a problem with my arduino because its a clone with CH340G chip.

I need a suitable driver for android, do you know about any? Thanks for replies

Jan_Henrik (author)  MrSlehofer.3 months ago

No, sorry, I dont know any drivers for android, doesnt it work with Arduino Droid?

Hi, is it possible to upload sketch in ArduinoDroid through Bluetooth?

Jan_Henrik (author)  digvijay.m.patil3 months ago

No, just via USB-OTG

diy_bloke1 year ago

"Sofortly", you must be German :-)

nevertheless, nifty instructable

Jan_Henrik (author)  diy_bloke3 months ago

*late comment incoming* Thankies, I replaced it with the right term ;)

Jan_Henrik (author)  diy_bloke1 year ago

hehe, yes i´m German :)

Thanks! :)

IrfanT4 months ago

if I use the arduino mega adk r3, how to connect android to arduino using usb?

please help me. Thanks

Jan_Henrik (author)  IrfanT4 months ago

scroll up and read my Instructable ;)

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.
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.

Jan_Henrik (author)  Professzore1 year ago

pin 13 has a current limit of 20mA, this pin was made to connect a led directly :)

on all arduino board? i use mega2560.

Jan_Henrik (author)  ZakiMuslim_4 months ago

I guess so

Take a look at the schematics:

Take a look at the datasheet:
29.1. Absolute maximum ratings

It's your decision to brick your controller and/or LEDs.

Note: pins on the microcontroller are not constant current outputs, yet none of them are protected to overcurrent.

each pin has an internal resistor which can be enabled; see digitalwrite() second parameter.

Also see "input and output" under

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.

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:


And the above mentioned datasheet of Atmel controllers (see digital I/O diagram).

I write it agan, it's your decision to brick your controller and/or LEDs.

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 "brick" 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.

ZakiMuslim_4 months ago

this apps have serial monitor? i want to see sensor value

techno man6 months ago
If your android device doesn't supports USB Host mode or OTG, you can make it into USB Host mode by following this steps:

STEP 1 : First you should root your android device.
For this find specific instructions for your model from such websites as The and XDA developer forums to root your device.

STEP 2 : Once rooted,install Stick Mount app a free app from Google play store.

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'.

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.

Note :( I'm not responsible for any problems /damages while rooting or using this method.Do it at your own risk)
Jan_Henrik (author)  techno man6 months ago

Awesome, Thank you! Didnt know about this possibility!

pucksurfer8 months ago
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?
Jan_Henrik (author)  pucksurfer8 months ago

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...

I have the moto e. it isn't a tablet but it should work with a phone right?
Jan_Henrik (author)  pucksurfer8 months ago

Yea, most new phones have OTG, but sadly the Moto E doesnt support otg :/

that's to bad, thanks for helping me
Jan_Henrik (author)  pucksurfer8 months ago

I´m realy sorry, that it doesnt work for you :(

KidWithAHat9 months ago
I wish I could do this on a iPhone :( but cool inscrutable.
Jan_Henrik (author)  KidWithAHat9 months ago

Thank you, I will try to find an app for that :)

lazaro.pt10 months ago

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!

Jan_Henrik (author)  lazaro.pt10 months ago

Hi, which phone and and which cables do you use, can you take some photos? :)

kschmidt21 year ago

Here's a question, I know in linux you can use the terminal to compile and send scripts to the arduino, do you think that with a terminal app (I'm talking iOS which is basically linux, which Android is a version of) you could do the same thing, possibly with the Camera connector? I'm gonna try it anyway, but I'll still ask.

FYI, IOS and Android (or Linux) are nothing alike under the hood, in terms of architecture and in development methods and in ease of accessing hardware from simple scripts. I love IOS as a user, but I'd not suggest it as a way to interact with Arduino. The exception is if you jailbreak IOS, which is more difficult with IOS 7 and few people do it.

That said, Cortado Bean (by Punch Through) holds promise of being a Bluetooth enabled Arduino which you can (eventually) program right from IOS. Don't expect the Arduino IDE to follow suit though this would be a Punch a Through paid product. (Google it, it's cool).

Well, I'm jail broken under iOS 6.x.x, that's the only way I could find a decent terminal app. so that'd help somewhat, but I don't really think an iPod would be that good for arduino programming when you can't connect keyboard to them AND the arduino at the same time, the arduino would use too much power and the fact of what you said above, not to mention I have an ODROID which I'm going to be making into a tablet soon anyway, and I have a little acer laptop, so there's two reasons more to not use an ipod.

Awesome instructable though man, the ODROID can run Android so I might try it with that some time. :D

1-40 of 70Next »