Control LED Using MIT App Inventor and Arduino

by ibrahim kamr in Circuits > Arduino

87342 Views, 41 Favorites, 0 Comments

Control LED Using MIT App Inventor and Arduino

controlling-an-arduino-with-android-1-638.jpg

This is a step by step tutorial on getting started with creating MIT app inventor android app and control things with arduino.

Lets Make our first app to control a LED

Getting Started With Arduino and Android

asd.png
Bluetooth stick.jpg
hjjbj.png

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

COMPONNENT REQUIRED

FAO1AP4IKVFWPPG.MEDIUM.jpg
FKUGVEWIKVFWPQE.SMALL.jpg
FRQLHIQIKVFWPQH.SMALL.jpg
pro-00001-detail_1.jpg
male to female connecting wire-500x500.jpg
slide1.png
font-b-HC05-b-font-HC-05-master-slave-6pin-JY-MCU-anti-reverse-integrated.jpg
R1B1-400-Points-Solderless-Bread-Board-Breadboard-PCB-Test-Board.jpg
Arduino_template.png

Hardware:

1. Arduino board

2.LED

3. Resistor 330 ohm

4. wires

5.Android Smartphone

6.Bluetooth module (HC-05)

7.test board

Software:

1.Arduino IDE

you can download from
https://www.arduino.cc/en/Main/Software

2.MIT app inventor

http://ai2.appinventor.mit.edu/

Hardware & Software Configuration

FULURMMIKJ86A5U.LARGE.jpg
FSKAI30HMMFE6UO.MEDIUM.jpg
Immagine.png
conn.png
simplefade_bb.png
F7O98UTIKJ8CA3M.LARGE.jpg
F4G7MX0IKJ8CA3U.LARGE.jpg
FR9ATQTIKJ8AW6C.LARGE.jpg

Well, the circuit assembly is not difficult. The circuit consists only of LED, resistor, HC-05 and Arduino. The long "leg" of the LED will be connected to the 5V through the resistor on Arduino pin number 13 while the shorter "led" will be connected to the GND. For the HC-05, the VCC is connected to 5V, GND to GND, RX of HC-05 to Arduino TX, while TX of HC-05 to Arduino RX.

1-connect led ,resistor and bluetooth module as shown

2-connect Arduino to your computer using USB cable.

3- Download Arduino IDE on your computer.

4- download the Arduino code below and open it using Arduino IDE

5-choose your Arduino board from IDE

tools<

6-choose serial port from IDE

tools<

7-run the Arduino sketch

8-upload sketch on your arduino board

MIT App Inventor Code Block

MIT App Inventor led control

First go to the App Inventor site http://ai2.appinventor.mit.edu/ and then it'll ask for your email and password and enter that in. Next, go to "Projects" and click "Start new project" and call it Led control

Running the App

3.png

There are many ways to run this application..but the easiest way is to download the MIT Ai Companion from the Google Play Store

check this link to more details

http://appinventor.mit.edu/explore/ai2/setup-devic...

Send the App to your android device,install it and begin control.

Have fun

Downloads