Week 16

Individual Assignment

Write an application that interfaces with an input or output device that you made.


This week I programmed an mobile Application, to connect an Android smartphone with my Fabduino. This assignments complemments the week 14, where I communicate and Fabduino via serial with an bluetooth device.

On this week I'm going to describe the process of the mobile app creation. First at all, I follow a youtube tutorial (from this link), to learn how to made an simpple app with MIT APP Inventor. to do this, we need to visit the website of MIT APP Inventor and Login.

Due to I based this app on the tutorial, I imported a the previous project into App Inventor. You can use the mine at the end of this page, to start with an app and a couple of buttons.

Later than, I just put a couple of buttons on the screen. On button for ON the LED and the other to turn off the same LED. Is something very simple to start.

Once the buttons are placed, on the Blocks screen, we define the behavior of each button and element on the screen of the app. The first part of this, is the bluetooth connection.

This block, make a selectable list of the devices availables to connect with the app.

Later, define the action of connect with the selected device. This part stablish a connection between the phone and the external device (my Fabduino). At this case, thanks to AppInventor, this task is very simple, due to appinventormakes the hardwork.

The next step is send a message between devices. At this case, the phone send a text to the Fabduino, a simple 0 or 1. This block in particular is made to get some feedback to the phone. It changes temporally the text showed on screen, to see if the device is connected or not.

Now, the next two blocks sends the text to the Fabduino. When pick on the ON button, we send a 1.

When pick on the OFF button, we send a 0.

Fianlly, all the blocks work togheter like this.

Now to load the app to the phone, we need to download the AppInventor companion App. Is no the unique way, but is maybe a simpliest. The companion app allow you scan a QR Code, to download the app builded with App Inventor and install it on your phone.

This way, the app is installed on the phone and the Fabduino connected like I showed on the week 14. The result was verry good.

Files of this assignment:

<<< Go to Week 15 assignment    |    >>> Go to Week 17 assignments