16. Interface and application programming¶
This week was Interface and application programming
and these were the assignments
Assignments¶
Individual assignment:
- Write an application that interfaces a user with an input &/or output device that you made.
Group assignment:
- compare as many tool options as possible
Individual Assignment¶
For this week I used MIT App Inventor to make an App (interface) with which I turn on an LED. I followed a few tutorials on the same applicatation.
MIT App Inventor¶
MIT App Inventor is an app creation website where one can create applications for Android smart phones. They have recently started to run beta tests for IOS devices.
Initially we have to create an account, once it is done we can create and save our projects online, the process is as follows:
- Select ‘start new project’.
- enter the project name.
- There will be a mobile screen which shows and replicates the UI of the app.
- All that’s left is to drag various components present on the left and drop them on the screen.
- You can edit the components’ properties on the menu to the right side-These include text size, colour, location and etc.
- to program the logic select the option ‘blocks’, a menu with options appear on the left, the options are logics blocks that are you used to create the program.
“Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”
Useful links¶
Code Example¶
Use the three backticks to separate code.
char Incoming_value = 0;
void setup ()
{
Serial.begin(9600);
pinMode (13, OUTPUT);
}
void loop ()
{
if (Serial.available ()> 0)
{
Incoming_value= Serial.read();
Serial.print (Incoming_value);
Serial.print ("\n");
if (Incoming_value =='1')
digitalWrite(13, HIGH);
else if (Incoming_value =='0')
digitalWrite (13, LOW);
}
}