Introduction: Voice Activated Lights / Led (ARDUINO and ANDROID)

Controlling You'r Home Lights using an arduino and you'r android phone!!!

This is my very first instructable, I wanted to control my home using an arduino and android phone.

There were many other options available for me to do so. but the cheap option which i figured out was using arduino. Even we can control the other electronic devices using the voice commands.

In this tutorial ill be showing you the very basic turning on and off a led using an android app which has even a voice command.




As am very new for making instructables pls excuse my mistakes :)

Step 1: MATERIALS REQUIRED

Materials U'll Need :-

1.Arduino (Am using UNO)

2.Bluetooth Module (Am Using BlueSmirf Silver from Sparkfun)

3.Jumper Wires Male - Female

4.An LED

And Definatly an Android Phone.

Software Required:-

1.Arduino IDE ( http://arduino.cc/en/main/software )

OPTIONAL:-

App Inventor (Only if you'r editing the app i have made)

This will help you if your instrested in making an android app.(http://appinventor.mit.edu/explore/ )

That's It for Now.

Step 2: UPLOADING ARDUINO PROGRAM

Copy and Paste Below code in you'r Arduino Ide

If you Want to Understand The Technique of what's Happening in code Then Pls Check Out Jeremy Blum's Tutorial 6 in this you will learn about how arduino takes serial commands.

int ledPin = 13;
String readString;

void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}

void loop() {
while (Serial.available()) {
delay(3);
char c = Serial.read();
readString += c;
}
if (readString.length() >0) {
Serial.println(readString);
if (readString == "on")
{
digitalWrite(ledPin, HIGH);
}
if (readString == "off")
{
digitalWrite(ledPin, LOW);
}
readString="";
}
}

Step 3: ANDROID APP

HERE u'll Find the app.

Some Photos Of The APP INVENTOR While Designing the app.

Install The app On you'r Phone.

NOTE: installing your app (which is an ".apk" file) will need to change the setting on their phone to allow installation of non-market applications

To find this setting on versions of Android prior to 4.0, go to "Settings > Applications" and then check the box next to "Unknown Sources". For devices running Android 4.0 or above, go to "Settings > Security" or "Settings > Security & Screen Lock" and then check the box next to "Unknown Sources" and confirm your choice.

Step 4: WIRING IT UP!!!!

Connect the Bluetooth Module To arduino :-
Arduino - Bluetooth

+5 - VCC ,

GND - GND ,

Rx - Tx ,

Tx - Rx ( Actually you Don't need this as we are only reciving data not transmitting )

Insert led At Pin 13 and Gnd.

Step 5: USE IT!!

Now turn on you'r arduino. u'll find a red light flashing on you'r bluetooth module.

headup to you'r phone and turn on you'r phone's bluetooth and pair the arduino bluetooth with you'r phone.

(if you'r using the bluesmirf the default code is 1234.)

Now, finally open the app select the Bluetooth Module and u"ll see that the App shows Connected and even the Light on The Bluetooth Module Turns to Green.

Enjoy it.

SEE IT IN ACTION

This Video is Very Old My first testing So please Ignore some things.

Step 6: FURTHER IDEAS

As Said Earlier this is just a basic setup to control the led.

further My plan is to control multiple devices even TV and make a very nice app. you can see some images of the another clean app i've made to control almost the whole House. And even some hardware.

Please Comment and Share Your Ideas with me.


Sensors Contest

Participated in the
Sensors Contest