Interface and Application Programming.

Week 14 Assignment summary

For this week, I tried to read readings of temperature, humidity, and blood oxygen calculated by my PCB Board to an App developed by me using the MIT app inventor.

I have briefly documented all of my work with firebase cloud, MIT app inventor, and programming.

Objective Of the Week

Individual Assignment – I have to interface my existing PCB Board to a mobile app in order to read up on readings captured by my sensors and controller..

Group Assignment – For the group assignment, we need to compare different Application tools, so we compared two application tools i.e., MIT app inventor and processing.

Workflow

Description of image

Firebase Setup

Opened Firebase Cloud on web browser.

Description of image

After getting started with it, I have created a new project with name “Smart Backpack”.

Description of image

After accepting all the basic terms by firebase, my new project become ready.

Description of image

After creating a project, clicked on realtime database to create new database.

Description of image

After creating new database, selected region as united state.

Description of image

After this process , I got a address link that can be used for developing APP.

Description of image

I have also require API key while developing app to integrate firebase to controller. So I have clicked on project setting> general setting , and I got API key for the firebase.

Description of image

This is API key generated and will be used in MIT app inventor while designing app.

Description of image Description of image

MIT App inventor

After successfully setting up firebase, I have stared developing app and for that I have used MIT app inventor.

Description of image

Created a new project by naming it. Basically, I require a basic app that can show readings collected by controller.

Description of image

As first step started adding images into it.

Description of image

Download a .png file of bag from internet and uploaded it into inventor.

Description of image

Added a text box for listing the title.

Description of image

Renamed the text by naming it as My Smart Bag- status.

Description of image

Used basic design tools to improve the title aesthetically. Also added blank label to create space.

Description of image

Added another label and named it as temperature for showing up readings.

Description of image

Used Horizontal arrangement command under layout section to split a area into two section, left side is for naming and right side will show collected readings.

Description of image

Repeat the same procedure for Humidity and blood oxygen sensor. Then under Experimental section clicked on firebasedp in-order to integrate firebase to app.

Description of image

Inserted Address url and API key generated from firebase to the properties of firebase inside MIT app inventor.

Description of image

After completion of design, clicked on blocks which is on right side of inventor.

Description of image

After that under blocks section added logic for the app.

Description of image

I just have to show up the readings open get variable under built-in section.

Description of image

Named that using text under built-in section.

Description of image

Added a block for temperature readings.

Description of image

Also joined it to get values of temperature.

Description of image

Using duplicate command use the same procedure for getting values of humidity and blood oxygen.

Description of image

After making duplicates of it, remaining the tags of temperature to for humidity and blood oxygen.

Description of image

After completing block design all the blocks will look like this.

Description of image

Then clicked on the connect tool> al companion.

Description of image

The QR generated can used used for installing app in mobile phone.

Description of image

MIT App Opened

Installed MIT app inventor app in my android device.

Description of image

After installing it clicked on connect with QR code.

Description of image

After that Inventor start sending assets to the phone, and it took little bit time. We an also download .apk file for that can be directly downloaded and can be installed in any android device.

Description of image

After completing process, I have open the app but it giving error by showing permission denied screen.

Description of image

So to resolve that, I again gone through the firebase and under realtime batabase > rules it is showing read and wright in “false” command.

Description of image

Then by changing it from false to true app started running.

Description of image

Programming

Libraries

Arduino Library for ESP32 C3 board.

ESP32- https://github.com/espressif/arduino-esp32.git

Description of image

Arduino Librar for Firebase

Firebase – https://github.com/FirebaseExtended/firebase-arduino.git

Description of image

Arduino Library for BME280 sensor

BME280 – https://github.com/adafruit/Adafruit_BME280_Library.git

Description of image

Code

Description of image

Processing

Processing is a flexible software sketchbook and a language for learning how to code. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology.

Description of image

i have installed processing to understand how it works.

Description of image

Tried examples of processing to learn and understand chnage in graphix by chnaging the code.

Description of image

Testing

Learnings of the week

What went Well

1) First time used Firebase cloud, and able to learn and use it.

2) This is my first app development attempt, able to understand basic terms of MIT app Inventor.

3) Used programmer Ide and tried to generate different grahix using codes.

What went Wrong

Faced issues with Programming and then issue with board.

Sensor showed up issue and unable to detect by the controller.

Download the all original file
Download File
-->