Renjith M S

Week 16:INTERFACE AND APPLICATION PROGRAMMING

Assignment:

  • Write an application that interfaces with an input and/or output device that you made, comparing as many tool options as possible.

This week I am planning to create an app for controlling the brightness of an RGB LED connected to ATMEGA 328 board made by me inInput Devices week .I am planning to make use of the MIT app inventory which is a cloud based software where we are able to create the required app and further it can be used on android phone.

Procedure involved in designing my app

First we have to Register in MIT app inventor. Then we can make the app interface by adding the buttons etc on the design pannel .Then we can add the program logic by creating control flows on the blocks panel. .

In order to understand and have some hands on experiance I prefered to go through some tutorials on Mit app inventor

My first app

I started by building an app which talk to me when I press on a button in the app.

Image

I added button,texttospeech and Accelerometer sensor in the Designer window.

Image

If all the components are placed in the designer window,now it is time for programming which is to be done in the Blocks region.The screen shots are provided which describes correcty what is done in the blocks window.Accelerometer sensor is being used in order to detect any change in the orientation of my mobile.

the above vedio describes what happens when the button is pressed

The reason behind,why I used Accelerometer in my design is evident from the above vedio

The mobile App for my child Rithika

Image

I was too much exicted when my first App was ready.So decided to make an App for my daughter Rithika ,CAT and Hat.

Image

In the Designer window ,In order to use the hat and cat,in addition to the sound for cat I uploaded three files from my desktop which was downloaded from internet.

Image

In order to see how our app is working in the android mobile ,first click on the AI companion ,after that connect it with our mobile using Mit AI2 companion ,which has to be downloaded from google play store.

Image

scan this key using the mobile

Image

In order to download the app in the computer click app(.save apk to the computer).similarly use the other one for downloading the app into the android phone.

The mobile App for controlling the brightness of RGB LED

Image

Place the Labels,listpicker,clock,bluetooth client and slider at appropreate positions in the designer window

Image

During programming in block window be careful while dealing with bluetooth cleint connections.

Image

I tested the app ,by controlling the brightness of the led using arduino by connecting the rgb led to the pin 9 .I used a potentiometer as the resistance for the led.

this is the first time I am controlling the arduino board using my own app

Image

The board which I made, did not have the pin out taken for the pb1 pin corresponding to pin 9 of arduino,so I changed the program by replacing pin 9 with pin 11 which corresponds to PB3 or MOSI of atmega328

Download my App from here .

Top