W13│ Interface and Appliction Programming

Individual Assignment:

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

1. Individual Assigment.

I was looking foward for this assigment, it was the perfect opportunity to develop the app for my Final Project. First I experimented with Python(awful resul), I couldn't achive anything and I was getting very anxious so I tried another tool: App Inventor that allowed me to program with block methodology (scratch like) instead of writting code.


I started by designing how I wanted my app to look and how it will interact with the user.

Experimenting with App Inventor

Fortunately this tool is very intuitive and there is a lot of tutorials to learn from. One of the best things I learnt was the use of layout components, they help me a lot to design the canvas and make it with hierarchy.Order will be a big deal here!!!.


After designing all the screens I needed it was time to connect the app with the board I design for the next assigment (Networking and communications. I needed to used bluetooth comunication and the serial protocol and it was mandatory to add a bluetooth block on the app. Here comes the problem, App inventor's allows you to use a bluetooh conecction per screen and whe you have many of them you will to connect and disconnect the bluetooth for each one. This is imposible, there is no way the app will work like that. I looked up for documentation and I found the option of having multtiple screens in only ONE Screen. So I had to re design everything, this time I did it very quickly thanks to my previous experience with the layout components


  • Blocks to make screens visibles.

  • Blocks to connect the bluetooth.

  • Blocks to connect with the board - Main Block
    1. By pushing the button Start, the app sends an "S" to the pad system to start the exercise.
    2. If you are not touching the mat, you will recieve a message saying "You are not touching the mat" and you can not begin with the exercice.
    3. If you are touching the mat, the system will send a "Start" that allows the app to change to the next screen and show you the exercice. It sends a "C" and the system waits the user to begin with the first exercise. The button for going to the next exercise is enable until it receives the "Next" from the app.
    4. When you are on screen 5 (dumbbell exercise) the app sends a "d" to the pad to begin with squats exercise.
    5. When you complete the exercise the system send to the app the message "Good Job".

  • Blocks to control the buttons


Tested with pads and sonar....ready for the final project.

Interface and Applications Programming from alucyem on Vimeo.


Code: Apk

← Previous Assignment → Next Assignment