Lab 2 - Gnkhakimova/CS5590-IoT GitHub Wiki

Lab 2

Source Code
Video Link

Team members
Ly,Sang Minh - Wiki Page
Chukka,Murali Krishna Sai - Wiki Page

Introduction

Create an in class project (Lab 2) to transfer temperature and light sensors data to a social media and create a graph to display the data. Using the barometer to display the temperature and using light sensor to display the light. With the provided sensors we are able to activate the sensor via Arduino. And using Node Red to get the data from Arduino to post to social media and created a graph to display to the user.

Objectives

The objective of this in class project (Lab 2) is to integrate Arduino and Node Red together. We used Node Red to post our data to a graph interface and posted the data from our two sensors onto Twitter (our social media).

Approach/Method

The approach that we followed to complete our Lab 2 task were to integrate one of our sensor with Arduino. Afterward, we transfer the data we get from Arduino onto Node Red. On Node Red we created a Serial In Node, because it will provide us with the connection of our Arduino and Node Red via the plug in port. We then created a connection with two functions one for the get input and one to split the data. Splitting the data, one for Light and one for Temperature for the debug message. This will allow us to debug the flow in case of failure. We created an RBE which allow us to monitor the changes for our Light sensor data which is connected to the graph UI for user. The other connection is connected with the temperature graph UI.

Workflow

For our Lab 2 project we integrate each component separately before we merge them together. This allow us to debug any issue before merging because debugging one item is more manageable than trying to figure multiple issue. For our first component, which was the light sensor. We connect the light sensor with our Arduino board and Arduino program. From there we transfer the data from our light sensor onto Node Red. And on Node Red we were able to display a visualization to the user. When we were satisfy with the result from our light sensor. We moved onto integrating the temperature sensor. We used the same approach as we did with our light sensor. First we connected the barometer with our Arduino and from the Arduino we transfer our temperature data to Node Red and from there we created a visualization displaying the temperature and temperature changes to the user.

Node Red Flow

Circuit



Circuit Diagram

Barometer sensor

This circuit diagram is how we connect our hardware component for our barometer sensor to measure atmospheric pressure. We first connected the barometer to the power sources and Arduino.

Light sensor

This circuit diagram is how we connect our hardware component for our Light Sensor to detect the surrounding brightness. First connected the Light Sensor to the power sources and Arduino.

Output

Dashboard

Twitter

Parameter

For this in class project (Lab 2) we had to include the visualization from Node Red. And from Node Red we also included the Serial In to establish a connection with Arduino and we also included the Twitter Node. With the Twitter Node we are able to send our temperature and light sensor data straight onto our Twitter account post. The other parameter we had to include were the Barometer which we used for getting the temperature and light sensor which we used to get our light data.

Conclusion

Conclusion for our team class project (Lab 2). As a team we were able to integrate all the components together, both the barometer and light sensor. Along with Node Red and Arduino, where we used to get the data from our sensors and transmit our data onto Node Red. From Node Red we used the data to create a visualization and post to Twitter.

Contribution

  1. Sang Minh Ly - ID 5 - 33% - configured circuit diagram, implemented Node-Red
  2. Murali Krishna Sai Chukka - ID 2 - 33% - implemented Node-Red and Arduino
  3. Gulnoza Khakimova - ID 3 - 33% - implemented Node-Red and Arduino