BACK TO HOME PAGE

WEEK 14

Interface and Application Programming


WEEK ASSIGNMENTS:


Tasks for a week

  • 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
      please check the group assignment here.


  • GUI(Graphical User Interface):

    GUI is a Graphical Interface that is a visual representation of communication presented to the user for easy interaction with the machine. GUI means Graphical User Interface. It is the common user Interface that includes Graphical representation like buttons and icons, and communication can be performed by interacting with these icons rather than the usual text-based or command-based communication.

    The uses of a pointer that serves as navigation to interact with different visually appealing Graphical icons. Abstraction is a major concept that has been used in a GUI operating system. Users can use the pointer to click on the icon, which initiates a series of actions. Normally an application or functionality will get started. Then the user will have to provide input or tasks to generate the desired action from the machine. The GUI actually translates user language, which comprises simple one-line commands, single click and double clicks to machine language or assembly language. The machine understands machine language, and hence the machine responds to the task initiated, which is translated to use language and communicated to the user via GUI.


    Software used:

  • Arduino IDE
  • Components:


    My final project will include using a motor driver to control a DC gear motor using a bluetooth module and an Android app.

    I used an arduino controller and a motor drive that I designed during embedded system and output device week.


    Simply Easy Learning

    Arduino controller(Vastuino)


    Simply Easy Learning

    DC gear Motor driver (28VDC and 30Amp)


    Simply Easy Learning

    Bluetooth module used for communication between the controller and the Android app.


    Circuit Diagram:



    Simply Easy Learning

    Android Application:


    In this assignment,I had to put together an app for the cell phone. I used App inventor.


    App Inventor in which such applications are created for various devices but through blocks relationships in a didactic way.


    Simply Easy Learning

    When you open the program, it shows you a blank sheet that simulates the Android screen of a cell phone or device. This program has a palette of resources to use as “Button”, “text box” which are tools that serve to outline the design of the App.


    First, I design the app, We used this options : HorizontalArrangement, HorizontalScrollArrangement, button,ClienteBluetooth and Notificador.


    Simply Easy Learning

    You can see the desing of the app.


    Simply Easy Learning

    First, I selected the horizontal arrangement option, and then I added the listpicker and labels options to a screen.


    Simply Easy Learning

    Then, add a distance label for the ultrasonic sensor to determine the desk's height.


    Simply Easy Learning

    To create the button division.


    Simply Easy Learning

    To include an upward button.


    Simply Easy Learning

    Create a downward button.


    Simply Easy Learning

    It starts by defining the entities in the application, and choosing the blocks that represent the function to perform.


    Simply Easy Learning

    First, I make a communication block to communicate between the android mobile and the bluetooth module.


    Simply Easy Learning

    In the connection block you make a configuration, if it is connected you can access the app, and if it is not connected, a message “DISCONNECTED” is sent, you have to connect via bluetooth.


    Simply Easy Learning

    upward and downward button block.


    Simply Easy Learning


    Simply Easy Learning


    Simply Easy Learning

    Bluetooth message block A message will be produced if Bluetooth is not connected to the mobile.


    Simply Easy Learning

    While the following screenshot shows my Blocks window that contains all the programming code:


    Simply Easy Learning


    Simply Easy Learning


    Simply Easy Learning


    Simply Easy Learning

    Now the app is ready to install on mobile phone. To do that click on Build from the top menu then App(provide QR code for .apk).


    Simply Easy Learning

    Wait until the QR produced. This may take 1 to 2 minutes based on your internet speed.


    Simply Easy Learning

    When QR code appears on the screen, open The MIT AI2 Companion app and scan it with your mobile phone.


    Simply Easy Learning

    Follow the below steps on the mobile phone to install the app:


    Simply Easy Learning

    Finally, the app is installed on the mobile phone. Pair the mobile device with the bluetooth module "HC-05", connect it, and the DC motor rotates in both the up and down directions.. The following video shows how to connect to bluetooth module and the operated system.












    "Click here"to download all files of this week


    Previous
    Next

    Final Project