Android phone controls Arduino over wifi

in Android, Arduino by 7 | 24 comments

We recently did a little demo to send data to an Arduino with a TCP/IP Shield (using ATC-1000M) from an Android device via Wifi.

The Android phone in this demo uses Android Scripting Environment (ASE). It is available on Android Market for free.

Videos and source code after the break.

Here is a short video demonstration of blinking the Arduino LED using Android.

// By 7
// Version 00.08.01
#include <SoftwareSerial.h>

#define rxPin 0
#define txPin 1
#define ledPin 13

SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);

void setup()
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);

void loop()
char c =;
  digitalWrite(ledPin, HIGH);
  digitalWrite(ledPin, LOW);

Arduino Simple Source Code

This is used to send a
character to the Arduino
via Wifi

By 7

import android, socket

droid = android.Android()


def test_alert_dialog_with_buttons():
  title = 'Alert'
  message = ('What do yo want to Send?')
  droid.dialogCreateAlert(title, message)
  response = droid.dialogGetResponse().result
  return response['which']

#Change this depending on the IP and Port of the ATC-1000M


print 'Done! Thank You!'

Python for Android Source Code

This entry was posted in Android, Arduino and tagged , .


  1. keystoneclimber says:

    Would have been impressive if the WIFI hardware was connected to and controlled by the microcontroller.

  2. 7 says:

    ^^ actually, that would be next (hopefully)

  3. glutnix_neo says:

    seven! seven! seven!

  4. glutnix_neo says:

    I have one question, why did you use a software serial instead of the hardware UART which is available for pin 0 and 1?

  5. Dai anh Tai says:

    Can you sell for me Android sourcecode “Android phone controls Arduino over wifi “.

  6. Dai Anh Tai says:

    Link died.
    Can you upload again or sell for me android code wifi.
    Thanks a lots.

  7. thor says:

    the link is deleted but the code is still posted above.

  8. Dustyn says:

    Nice! Have you seen anything like this using the iPhone?

  9. Raju says:

    i like your idea much.. dear plz can you send me android code for this project. is my id i will be so much thankfull you..:)

  10. Ufo says:


    Can you send me too your android code on e-mail:


  11. Mirza says:

    Can you please send me the source code. I would appreciate that. My email is . Thank you in advance!

  12. Mrad says:

    this is what i was looking for..i want to do an application with 4 bottons that controls 2 dc motors connected to an arduino mega via wifi..can u send me the android source code please.
    thank u in advance :)

  13. Pidozky says:

    Good day!
    Can you also share with the android source code.
    Thanks a lot…

  14. uzy says:

    how to transfer data from arduino to android?

  15. sharizal says:

    can u email to me the android source code.. im really appreciated your helps.. im developing arduino project now.. tq

  16. Alejandro says:

    Can you send me too your android code on
    Thanks a lot.

  17. Jopas says:

    nice work ! can u send me the full android program coz this is what i’am looking for .. tenk you in advance :D e-mail:

  18. marwa ben massoud says:

    it ‘s a nice job ,please could you send me your android code thank you
    my mail:

  19. ipan says:

    Pl. share me the schematic diagram and source code to implement for my final year project

    (Android phone controls the micro controller through WIFI)

  20. Jhon says:

    Very nice your idea.. I am a student system engineering and I am interested in learning how to control android and arduino using wifi , plz can you send me android code for this project. my email is I will be so much thankfull you..:)

  21. mehul says:

    I am a student MCA and I am interested in learning how to control android and arduino using wifi , plz can you send me android code for this project. my email is I will be so much thankful you..:)

  22. Unknown says:

    This is what i was looking for… :) can i control any UART wifi module by my android phone? i haven’t arduino… reply me soon plz…

  23. Unknown says:

    Hey :)
    that is exactly what i am looking for.. I also try to program a project for my School education and i need 3 Buttons to control an LED Matrix to show the time. Please can you send me the arduino and android code please
    Thank you

  24. vijay says:

    superv…can u send “Android phone controls Arduino over wifi ” code to

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.