loading

I have made many tutorials for creating apps using MIT app inventor and connected the app with arduino to make things work, I often get email stating something went missing when they follow my tutorial, Here's a step by step tutorial on getting started with creating MIT app inventor and control things with arduino. To complete this tutorial you need a Bluetooth module HC-05 or HC-06 to connect with arduino and send or receive data to and from other Bluetooth device.

Lets Make our first app to control an LED

1.Getting Started with Arduino and Android


This video gives insight into MIT app inventor and what are the requirements need to get started with this video series, anyone watching this video can make their own app and control a LED connected to arduino without any prior experience, if they have components with that's more enough to make this tutorial. Blinking an LED is the first thing we do when we getting started with electronics in this tutorial you will TURN ON and TURN OFF the LED, this is the Hello world example in this tutorial, you don't need any prior coding experience to make this application work. To test the app that created during this tutorial, you need an Android mobile or android supported devices to test your app. creating an app with MIT app inventor is very simple, you won't be doing any coding process during creating your app, you will be assembling blocks together to make your app. if you don't have any prior experience with Arduino control, make sure you follow some basics like connecting Arduino to your computer and upload example code to Arduino from Arduino IDE, this would be more sufficient to follow this tutorial.

#include <softwareserial.h>


SoftwareSerial BT(10, 11); //TX, RX respetively
String state;// string to store incoming message from bluetooth


void setup() {
 BT.begin(9600);// bluetooth serial communication will happen on pin 10 and 11
 Serial.begin(9600); // serial communication to check the data on serial monitor
  pinMode(13, OUTPUT); // LED connected to 13th pin




}
//-----------------------------------------------------------------------//  
void loop() {
  while (BT.available()){  //Check if there is an available byte to read
  delay(10); //Delay added to make thing stable 
  char c = BT.read(); //Conduct a serial read
  state += c; //build the string- either "On" or "off"
  }  
  if (state.length() > 0) {
    Serial.println(state); 


  if(state == "turn on") 
  {
    digitalWrite(13, HIGH);
    
      } 
  
  else if(state == "turn off") 
  {
    digitalWrite(13, LOW);
     }
  
  
state ="";}} //Reset the variable


</softwareserial.h>

Step 1: 2. Android Arduino Speech recognition app.

In this tutorial you will know how to create a speech recognition app that will convert your speech to text and send command to your arduino and do certain task that matches your command, you don't have any control over the speech to text conversion process, it is entirely depend on the google speech to text conversion engine, we will be making use of the speech to conversion process in this app, when the process of getting converting the text is over we will be sending the converted command to Arduino. You also need internet connectivity to do this process because google speech to conversion engine depends on Internet connectivity to do this you cannot do this process offline, you need to be connected with internet when following and working this tutorial. once you complete this app you can use this for many applications including Home Automation, Controlling a Bluetooth robot, sending voice command to do a process there are many possibilities with this application. The same hardware what you have created previous tutorial is enough for this tutorial you don't need to change your hardware connection to make this work. keep your hardware same connect this app to your arduino and start to send your command.

<p>Hi... how to control led's through voice command by using Arduino Ethernet shield? </p>
<p>Hi... how to control led's through voice command by using Arduino Ethernet shield? </p>
<p>Hi... how to control led's through voice command by using Arduino Ethernet shield? </p>
<p>Hi... how to control led's through voice command by using Arduino Ethernet shield? </p>
<p>Hi... how to control led's through voice command by using Arduino Ethernet shield? </p>
<p>SUPER tutorial, made them all.</p>
<p>That's awesome :)</p>
<p>Magesh... need help regarding the MOTOR CONTROL Tutorial ... How have you powered the arduino ??? How have you used the dc socket to power it ?? Need urgent help regarding that ... would be glad if you could post photos of the same ..</p>
<p>I used two 9v DC battery, one for powering the arduino and another one is for motor driver. I don't have the robot with me or the parts as I am away from home. </p>
okay thanks a lot brother. Superb Instructable !
<p>can you show a demo video how to connect arduino to a cloud and monitor the readings online and control it ,for example temperature and humidity sensor or water controller</p>
<p>Hi, Nikhill to connect a arduino to cloud, you should either need a WiFi shield or Ethernet, which will add cost on to your Setup, if you use ESP8266 its easy do all the job you have said. http://internetofthinking.blogspot.in/ check it there</p>
<p>Brilliant link. Thank you so much for posting.... going to fiddle with IOT and BL in some days ... ordered an HC05 as well... thank you again for this amazing amazing instructable ! </p>
<p>Hi akshay, Is your HC-05 4pin or 6pin? where did you get yours and how much was it? Hope you can help, Thank you very much... John :)</p>
<p>Hey there John... greetings ! </p><p>My HC-05 module is a 6 pin module. It cost me 340/- INR equivalent to $ 5. </p><p>Always a joy in helping everyone around here. :) </p><p>Here is the Amazon India link: <a href="http://www.amazon.in/Bluetooth-Transceiver-Module-TTL-Outputs-HC05/dp/B00R95Y0AK?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o01_s00" rel="nofollow">http://www.amazon.in/Bluetooth-Transceiver-Module-...</a></p><p>Here is the Amazon Worldwide link : <a href="http://www.amazon.com/Wireless-Bluetooth-Transceiver-Module-Arduino/dp/B00PQ30CXQ/ref=sr_1_5?ie=UTF8&qid=1458881240&sr=8-5&keywords=HC-05" rel="nofollow">http://www.amazon.com/Wireless-Bluetooth-Transceiv...</a></p><p>Both are essentially the same models with slight variation in the fabrication. </p><p>Happy Building ! :) </p><p>regards,</p><p>Akshay</p>
<p>Really nice - will have a go at app inventor....... gotta switch back from windows phone to android though :/</p>
<p>I am still sticking with windows :( soon make tutorial for windows too </p>
<p>I just got both :) My windows phone was an upgrade, and I swapped a r/c plane for a Samsung ace mini 3 :)</p>
<p>That would be great, I would really like to see that.</p>
<p>Don't take this comment too bad. English (or in this case the american <br>dialect) is not my 1st language. Obviously you have a strong <br>indian/pakistanese accent which makes you completly unintelligible. If <br>you would slow your speech I think your comments would be more <br>understandable. Thanks for the instructable anyway-</p>
<p>Don't take this comment too bad. English (or in this case the american <br>dialect) is not my 1st language. Obviously you have a strong <br>indian/pakistanese accent which makes you completly unintelligible. If <br>you would slow your speech I think your comments would be more <br>understandable. Thanks for the instructable anyway-</p>
<p>i needed such a awesome tutorial with so much depth and explanation to learn andrunio with android.</p><p>thank you alot</p>
Thanks. Was a verry useful instructable for me, for my first app. I use a DS18B20 temperature sensor.
<p>That's awesome</p>
<p>MAGESHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH !!!!!</p><p>YOU BRILLIANT GENEROUS MAN !</p><p>Thank you so much for this wonderful instructable. One of the best i have ever seen.</p><p>God bless you.</p>
<p>Thanks for your kind words</p>
<p>how about an iPhone app</p>
<p>sadly I don't own a Iphone to test my apps :( :(</p>
<p>Thanks - nicely done.</p>
<p>Thanks for your comments</p>
<p>Sweet..! I have always wanted to do this... Thanks for the &quot;how to do it&quot; demo..!</p>
<p>Thanks for checking it :) </p>
<p>I just needed a tutorial like this. Thank you so much for sharing!</p>
<p>great info, thanks :D</p>
<p>glad you liked it. </p>

About This Instructable

40,627views

741favorites

License:

Bio: I make hobbyist stuffs and play with electronics follow me to know more https://www.facebook.com/arduinolabviewsolidworks https://twitter.com/learnrobotix
More by Magesh Jayakumar:Quick Start to Nodemcu (ESP8266) on Arduino IDECourse on MIT App Inventor and ArduinoHat for the Party
Add instructable to: