FABACADEMY 2019

This page covers my process through the fabacademy, illustrating my progress, discoveries, failures, reflexions and inspirations.

Week 16

Interface and application programming

Link to the class content

MIT APP Inventor

Is an intuitive, visual programming environment that allows everyone – even children – to build fully functional apps for smartphones and tablets. Use blocks-based tool facilitates the creation of complex, high-impact apps in significantly less time than traditional programming environments. Link to the web page

We use this web application to understand the basic concepts and apply them in a really easy way to create an application for our phones and connect them through bluetooth with an arduino one and blink the LED. To use this application we need a Google account and sing in.

Check the work flow!

DESIGN:

Create the buttons:

Create a Layout:

Create a lay out:

Set the Buttons with this properties:

BLOCKS (Code):

When I click the "ON" button I will send the mesage "1" to the bluetooth device:

When I click the "OFF" button I will send the message "0" to the bluetooth device:

Display a list of the available bluetooth devices and the names:

To Connect with the selected device from the list:

BUILD:

When the code is ready we can install our app by two different ways the first one is scanning a QR code and the second one by installing manually. Before installing our application in our cellphone we need to go to the security seethings and allow installation of the applications from both trusted and unknown sources.

You can download the files:



FINAL RESULT:

After installing the app I had to turn on my bluetooth and pair my phone with the bluetooth device "Slave" and after that open the "Shelter" app and push the bluetooth button and select the "Slave" device and connect to it.

To test if the app was working right I connect the bluettoth device to my pc through a FTDI cable and open the arduino software and the serial monitor and setup to "Both NL & CR" and "9600 baud". And when I push the "ON" button the message "1" was displaying in the screen and when I push the button "OFF" the message "0" displays on the screen.

Check the video!

Interface with the board made by me.

For this part of the assignment I will connect through bluetooth my cellphone using the application that that I create and I will send the datum "1" to turn on and the datum "0" to turn off the stepper motor attached to my board developed and programmed in the Week 14. I did the next work flow:

Conclusion:

The MIT App Inventor is a really useful and very easy way to create interface and applications because of the blocks system I just need to make some decisions about the design and in the code part the block system allow me to understand better which blocks must fit correctly with each other.