Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a Arduino Mega ADK 2560, can I control an LED from an android app without any shields attached to the arduino ie via usb serial cable?

I have browsed for this and most of them are using a Bluetooth shield/any other shields. Can you provide some guidelines or links that contain Arduino and android code that works for this simple task?

share|improve this question
add comment

2 Answers

for the Arduino Mega ADK 2560, you need to buy either a USB host shield or a bluetooth shield so you can connect it to an Android phone using Android ADK.

If you want to use your Android phone as USB host and Arduino Mega ADK 2560 as USB slave, it is possible to do but you have to work a lot on the code. So I suggest you to buy a shield and use Android ADK library instead.

share|improve this answer
    
No. The Arduino Mega ADK 2560 already includes the USB host functionality. –  Chris Stratton Jun 19 '13 at 4:03
add comment

Yes, for moderately low current LEDs you should not need anything else, except a current limit resistor.

This is because the Arduino Mega ADK 2560 already includes the USB host interface chip, the part that would have to be added to a vanilla Arduino via a shield.

Bluetooth shields are another option, as an alternative to the ADK USB host interface which the board you have selected already provides, so you don't need a bluetooth shield unless you wish to have a wireless connection, or use a very old Android device which predates the ADK interface availability.

Actually connecting the LED would follow any of the arduino blink tutorials; typically though you would connect the LED and series resistor in series, with the LED anode towards the +5v supply and the LED cathode towards a "digital" pin. The resistor can go on either side of the LED. We connect the anode and switch the cathode with the I/O pin because I/O pins typically do better at sinking negative currents than at sourcing positive ones due to details of semiconductor physics.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.