This tutorial is a part two of “Controlling Home Appliances using Android App”. In this article we will make an android app from scratch, to control led of ESP8266 Node MCU board, that we controlled from browser last time. To create an app, we will use “MIT APP INVENTOR 2”. Its a very simple way to make android app within few min.
You can find Documentation for app invetor on this bellow link: http://appinventor.mit.edu/explore/library.html
Login with your gmail.
Click on Start New Project, then you will see a screen like below.
From left user interface section , bring Button, text box, lebel and drop on on your screen. You also have to add one more component that is web which you can find in connectivity section in left panel.
After adding, connect your phone with app inventor. You have to download one android app in your smart phone. From this link.
Now in browser, press connect button shown in above image, Click on AI companion in app inventor page, and you will see a QR code . You need to scan QR code in your android app that you have installed and press connect. Now all changes in screen will reflect on your phone. (make sure, your phone is connected with internet.)
Now go to Blocks Section in top right corner of app inventor page in your browser.
Make block like bellow, I am sure, its easy, and you can figure out how to make by yourself.
I have given a good look, to the app, by adding image to the button, and changing image(on.png and Off.png ) when clicked. The app I have created looks like bellow. You can also download the app from the play store(click Here to download app)
That’s all, Now you enter, your ip of ESP8266 or node mcu board. And you press the button to control LED.Now understand and analyse both app and esp code. Do let me know, if you have any questions. In comment box bellow.
In the next tutorial , we will control the same LED from outside home network over internet.