WEEK 14: INTERFACE & APPLICATION PROGRAMMING


GROUP ASSIGNMENT:
COMPARE AS MANEY TOOL OPTION AS POSSIBLE:


TOOL/LANGUAGE/DEPLOY

CLOUD

In cloud there are various option available like AWS, Azure, Google. AWS is the market leader on Cloud and have wide varities of services available.


AR/VR

In AR/VR there are Various games engine, Unity, Cloud Options like AWS Sumerian. Basically its Need programming background like C# for Unity, good for creating immersive experiences.


PROGRAMMING LANGUAGES

Ther are some famous and mostly used programming languages are Python, Java, Scala, Node.JS. Python is most widely used programming language, Scala is quite difficult for a beginner level. Java is more object oriented and procedural language where Python is functional language. But now Node.js is widely framework for creating full stack applications.


BLYNK

Blynk supports hardware platforms such as Arduino, Raspberry Pi, and similar micro-controller boards to build hardware for your projects. Blynk supports the following connection types to connect your micro-controller board (hardware) with the Blynk Cloud and Blynk personal server:
• Ethernet
• Wi-Fi
• Bluetooth
• Cellular
• Serial


PYQT5

Qt is a set of cross-platform C++ libraries that implement high-level APIs for accessing many aspects of modern desktop and mobile systems. These include location and positioning services, multimedia, NFC and Bluetooth connectivity, a Chromium-based web browser, as well as traditional UI development. PyQt5 is a comprehensive set of Python bindings for Qt v5. It is implemented as more than 35 extension modules and enables Python to be used as an alternative application development language to C++ on all supported platforms including iOS and Android.

PROCESSING

Processing is a graphics library and IDE based on the Java programming language, first released in 2001 by developers Casey Reas and Ben Fry. Its goal is to simplify computer programming for visual artists, providing new classes and mathematical functions for creating and processing computer graphics. Its IDE, called Sketchbook, uses an abstraction, called a "sketch," to represent its fundamental Java class, HERE .

Basically Processing is besed on a Java-based language. It is an open source programming language and integrated development environment (IDE) developed for new media arts and visual design communities with the Image processing

LABVIEW

A bit difficult to learn but widely used in industrial applications.LabView does not interfaces directly with any other party hardwares such as Arduino, Raspberry Pi etc but since its a modular programming language it is able to program and read data from external party hardwares through VISA Modules.

MIT APP INVERTER

MIT App Inventor is a web application integrated development environment originally provided by Google, and now maintained by the Massachusetts Institute of Technology (MIT). It allows newcomers to computer programming to create application software(apps) for two operating systems (OS): Android (operating system)|Android, and iOS, MIT App Inventor is an intuitive, visual programming environment that allows everyone even children to build fully functional apps for smartphones and tablets. Those new to MIT App Inventor can have a simple first app up and running in less than 30 minutes.The MIT App Inventor project seeks to democratize software development by empowering all people, especially young people, to move from technology consumption to technology creation, HERE .

In creating App Inventor, Google drew upon significant prior research in educational computing, and work done within Google on online development environments.



INDIVIDUAL ASSIGNMENT:
WRITE AN APPLICATION THAT INTERFACES A USER WITH AN INPUT&/OR OUTPUT DEVICE THAT YOU HAVE MADE.

In this week I want to make a mobile app which can controll the Lamp using Bluetooth & relay module. I want to work on home automation using mit app inventor to ON/OFF the 220v AC supply Appliances. I am new to app making so I searched on internet and found the MIT app inventor is good platform for new app developers like me.

MIT APP INVERTER

MIT App Inventor is a web application integrated development environment originally provided by Google, and now maintained by the Massachusetts Institute of Technology. Best thing about this platform is that it block/graphically programming. You can drag and drop the blocks to make your own constumize app. You can make your own app HERE

APP MAKING USING MIT APP INVENTOR

Open the above link and create/login into your account. Select the new project.


Mobile phone with screen will appear. This is the page where graphical work of app will be done


Change the text with your desired name.

After changing the text screen will look like this.


DRAG THE LABEL

Drag the label then change font size 24 and change the width fill parent .

Name the label as I gave the name "Bluetooth Lamp".

Now select the list picker for searching the Bluetooth devices and pick the gray color.


ADD THE BUTTONS

For buttons pick the button and drag the number of buttons with your requirenment.

I added 2 buttons and set the width 50% because I wanted two buttons in one row.


ADD BT CLIENT

Then click on connectivity(avaiable on left side). Select the bluetooth client and drag it to the below the main screen. This add the bluetooth instant to the app.

Change the text name as Lamp ON and Lamp OFF with 50% width.


BLOCK PROGRAMMING IN MIT APP INVENTER

Now Click on Blocks to switch the window from desinging to block programming. First of all we need to set up bluetooth connectivity for that follow the steps.


WHEN BLOCK OF LIST PICKER(BEFORE PICKING)

Double click on list picker and drag the "When block with before picking". Drag the set element and place inside the when block. Add the bluetooth client with address and name.


WHEN BLOCK OF LIST PICKER(AFTER PICKING)

Double click on list picker and drag the "When block with After picking". Go to list and drag the "Call bluetooth client" block. Add the lister picker element on its input. Click on element and change it into selection.


CREATE FUNCTIONS FOR BUTTONS

Now it is time to make function of button

I am writing a code in this way when any button is clicked, it send any Alphabate via bluetooth to microcontroller. And microcontroller will act accordingly.

Click on any desierd button then drag the block "when button is clicked". Inside this block whatever you put command. App will do when this button will be pressed. I have only two buttons one is for ON the Lamp and second is for OFF the Lamp.


GENERATING QR CODE

using mit app inventor for mobile Go to build then select the App (provide QR code for apk).

Loading for QR code.open mit website in mobile and select it for QR scanning.

Scan the QR code in mobile you will get an application in the mobile.


Block Diagram

This the Block Diagram I will follow it during the connection.


ELECTRONICS CONNECTION

Now this is the connection diagram of the bluetooth Lamp

I am using board of Atemga 328p which I made in week10 (Input devices). Microcontroller board is connected with HC-05 bluetooth module and single channel relay module is used to controll the AC power for triping the Lamp while giving signal through mit application.


PROGRAMMING

Upload this code to the microcontroller. This code receive data from BT module which is sent through mobile app.

Here, it shows the power on and off on serial monitor. while giving command to the bluetooth using mit app.


FINAL TESTING


SHEDOW LAMP

I used my instructors laser cut lamp for this week to connect lamp with mitapp through bluetooth HC-05





Propeller Led Pendulum Clock by Engr. Rashid Ali is licensed under Attribution-ShareAlike 4.0 International


Download all files from here