Introduction




Name of Experiment: E Sense

Exp No: 6

Background: Student should have a basic knowledge of Arduino software & Arduino programming.

Summary: After going through this experiment, students will be able to display various environmental parameters such as humidity & temperature and control the AC or fan or light according to the need of the user as an IoT application.

Learning Objective: To illustrate the interfacing of various displays: LED & LCD; Sensors: temperature & humidity and other peripherals: buzzer & fan as an integration with Intel Galileo Gen1.

Target

Target Platform: This experiment is tested on Intel Galileo Board Gen1 using Arduino software.

Procedure

SourceCode

Source Code:

#include <LiquidCrystal.h>
int outputpin= 0;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()
{
lcd.begin(16,2);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);

}

void loop()
{

while(1)
{
int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/1024.0) * 5000;
float celsius= millivolts/10;;
lcd.setCursor(0, 0);
lcd.print(" BY IGDTUW:ESENS,");
lcd.setCursor(0, 1);
lcd.print(celsius);
lcd.print("C");

if(celsius>25)
{
digitalWrite(10, LOW);

digitalWrite(9, LOW);
digitalWrite(8, LOW);
delay(1000);
delay(1000);
delay(1000);
}
else
{
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
digitalWrite(8, HIGH);
delay(1000);
delay(1000);
delay(1000);
}
delay(1000);

}
}

Snapshots





Observation

Observation: It is observed that the room temperature of Embedded Systems Lab dated: 1-09-2014 is displayed on the LCD and it is correlated with the actual temperature. If the temperature goes beyond the predefined threshold value (e.g. 30C in this example) then the buzzer will sound & the fan started working and in the reverse condition, the buzzer will stop making sound and the fan also stops working. Thus this experiment will be extended to control individually each peripheral through the Bluetooth by the authorized mobile of the user as an IoT application. This will be extended with other sensors in future work.

Video Link

Download

Right Click Here And Select Save Target For Entire Download:

E Sense