Week 17: Interface and Application Programming


First thing, I did for this week is watch Neils lecture video. The lecture begin off with the link to the collection of “hello world” program being written in nearly all the programming languages known to human! Huge stack to explore indeed. Let's move to assignments.


Assignment:

This week assignemt is to write an application that interface with an Input or Output device I've made as well as to compare as many tool options as possible. I Explored through MIT App inventor, Scratch and then moved on to processing for doing the assignment.

I used "Hello World" board for the assignment. The board has a LED and button. I used processing with arduino IDE for the assignment.The first program I wrote was to on and off the LED using two buttons in the processing window. The second program I wrote was to use button in the "Hello World" to control the processing screen.

I did go through the processing tutorial page to get some idea regarding the software and how to use it. Also, a few youtube tutorials seemed helpful. Processing is very similar to Arduino IDE.

On and Off LED using buttons in processing



I used sketch loader breakout board to load the arduino sketch to the board. There were a few hurdles that I faced. first one being, finding the serial port number in Mac. Type

ls /dev/tty.*

in the terminal and then you can read that serial port using the screen command screen

/dev/tty.[yourSerialPortName] [yourBaudRate]

After this was updated in the sketch, still my board was not being interfaced, after doing a lot of checkings, I realised that this was because my serial port in arduino IDE was open. Once I closed it, then there was no issue.



Design Files

Arduino Sketch - 1

Processing Sketch - 2



Using button in board to control the processing screen

Here, the sketch is written is such a way that the led blinks in low speed at the same time the screen too blinks slow. When the button is pressed the led blinks fast and so is the screen blinks in yellow. The Debouncing capacitor is not connected, hence for every press of button there occurs bouncing effect



Design Files

Arduino Sketch -1

Processing Sketch -2




Different tools to do Interfacing

Scratch

Scratch is a tool which can be used to program interactive stories to games. It's a project developed at the MIT Media Lab that's being widely used by educators round the globe to teach kids programming. It's a lot interactive and can be easily learnt.


MIT App Inventor

App Inventor is a free, cloud-based service that you access using a web browser. In MIT App Inventor first you need to design the front end side on how the app would be looking like. Then you need to do the coding part, on what all the parts in the app do. For creating mobile app's MIT App Inventor is a good option.

Insights:


What I learnt from this week's schedule...

How to use processing and create computer apps to control board

Different tools to create applications in Mobile and computers to talk to boards