ICP 9 - Gnkhakimova/CS5590-IoT GitHub Wiki
ICP 9
Video
https://www.youtube.com/watch?v=IWt67mrpLdk
Source Code Arduino
https://github.com/Sang-Ly/ICP9/blob/master/ICP%209%20-%20Arduino
MIT APK KEY
https://github.com/Sang-Ly/ICP9/blob/master/ICP9%20.apk
MIT AIA KEY
https://github.com/Sang-Ly/ICP9/blob/master/ICP9.aia
Introduction
Create an in class project (ICP 9) and turn on and off LED light use mobile device application. For the in class project (ICP 9) the idea is to create a notification using MIT App Inventor, Arduino, Barometer, Bluetooth detector, and mobile device application. Using the given Barometer sensor and Arduino, connected them to a power sources, Arduino code which will allow activating the Barometer sensor to output temperature data. From the received data, it is than transfer to MIT App Inventor which will allow Bluetooth connection to mobile device application. Before starting on ICP 9, first have to create a on and off button to switch the LED on or off via a mobile device application.
Objective
The objective for this in class project (ICP 9) and class demo, on and off LED light, is to integrate Arduino with MIT App Inventor, Bluetooth, and mobile device application. Arduino will both activate the LED light and Barometer sensor which will allow the user to turn on and off the LED light and transfer data from the Barometer Sensor to the user and displaying an alert box if the temperature goes too high.
Approach/Method
The approach that we used to complete this in class project (ICP 9), we first have to start with the class demo of creating an on/off switch to turn on or off the LED light. We follow the given demo in class of connecting our Arduino with the power sources and the LED light. Next, we connected the Bluetooth sensor and modified the flow in MIT App Inventor so that we can connect to our mobile device. As we are able to connect to the MIT App Inventor with our mobile device we than are able to send data to turn on or off the light. After successful integrated those component together, we than moved onto developing our project (ICP 9). This time instead of sending data to turn on and off the LED light, instead we are receiving information from our Barometer Sensor and displaying it to the user. First, we kept all the component of the LED light intact and we integrate the Barometer Sensor. Next we activate the sensor using code from Arduino. Lastly we modified the MIT App Inventor flow to allow the app to receive data from our Arduino. Once we establish the data transferring from Arduino and MIT App Inventor and able to see our data from our mobile device application, we begin to create an alert system that will display a alert if the temperature goes up too high.
Workflow
We made sure the in class demo of turning on and off an LED light was completely working before we started integrating our in class project (ICP 9). We first started with putting the hardware component which were the LED light together by connecting the Arudino to a power source than connecting our LED light. We then configured both the Arduino code to activate the LED light and MIT App Inventor flow chart so that we can transmit data from our mobile device application to turn on/off the LED light. When we completed our LED light, we began to integrate our Barometer Sensor into the Arduino and we code in Arduino to activate the Barometer Sensor to display the temperature data. We than send the display data to MIT App Inventor so that we can display it on a mobile device application and display an alert if temperature goes too high.
Circuit Diagram
This circuit diagram shows how to connected our LED light, Bluetooth Sensor, and Arduino to the power sources.
This is the MIT for our LED Light turn on and off switch.
This is our MIT App Inventor for our ICP 9, displaying the temperature we get from our sensor to the user mobile device application.
Parameter
In our in class project (ICP 9) we had to include parameter of MIT App inventor which allow us to get data from Arduino. Mobile device application which allow us to display the temperature data and alert box to the user. Lastly we had to include a Bluetooth connection sensor. The combination of MIT App Inventor and the mobile device application which are used retrieve data from Arduino which is used to display the temperature to user in a real time visualization. The other parameter we had to include were the LED light and Barometer Sensor.
Evaluation/Discussion
As a team, and credit to our teach, we decided it was best to work on the in class demo before we started on our in class project (ICP 9) because the demo helped us understand how to use the MIT App Inventor and how to connect to the Bluetooth Sensor. We first started connecting the LED light to our power sources with Arduino. Next we transfer data to activate our LED light and from there we created a flow in MIT App Inventor to allow us to control the on and off switch from our mobile device application. When we successfully integrated and able to make the LED light function correctly to moved onto our in class project. We integrated the Barometer and reactivate the Arduino code to allow our sensor to transfer data to the MIT App Inventor and our mobile device application so we can view the temperature data on our mobile device at real time visualization.
Conclusion
Conclusion for in class project (ICP 9). As a team we were able to complete both the in class demo and the in class project itself. The in class demo helped us understand how to connect to a Bluetooth sensor and understanding how MIT App Inventor work. We were able to turn on and off an LED light from our mobile device application. We also were able to retrieve data from our Barometer Sensor and display the temperature to the user's mobile device and if the temperature goes too high an alert box will appear displaying temperature is high.