Introduction: LinkitONE Room Humidity Sensor

Ever wanted to build something cool with electronics? Want to make your room environment sensor to check humidity of your room? Got a LinkitONE board? Then you are at the right place!

Here i'll show you how to make a humidity sensor using LinkitONE, (DHT11) which sends a message to your computer via serial about the humidity in the surrounding.

Let's begin...

Step 1: What Do You Need?

1) LinkitONE Board

2) DHT11 Sensor

3) micro-USB cable (for programming board)

4) Battery pack

5) Some jumpers

6) A breadboard (you can do this project without it)

Step 2: Assembling the Parts

Here i'll show you how to assemble your sensors with the board.

First, take your sensor, you'll see 3 pins in it-

1) GND

2) DATA

3) VCC

Connect your sensor to a breadboard and then connect the GND pin to GND pin of your linkit, VCC to 5V, and DATA pin to A0 pin.

Finally connect everything and lets move on to the next step!

Step 3: Writing Some Code

The code is really simple here! There's nothing much!

We're just taking a analog reading from sensor about humidity in the environment. We are first analyzing reading for 30 seconds and then giving back the readings.

CODE:

------------

#include "DHT.h"

#define DHTPIN A0

//#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {

Serial.begin(9600);

Serial.println("DHTxx test!");

dht.begin();

}

void loop() {

float h = dht.readHumidity();

float t = dht.readTemperature();

if (isnan(t) || isnan(h)) {

Serial.println("Failed to read from DHT");

}

else {

Serial.print(" %\h");

Serial.print("Temperature: ");

Serial.print(h);

} }

------------

Okay, so now burn this code to your board.

Step 4: Testing It Out!

Now test your device!

Just burn the code on your board from the previous step and then start! Open the serial monitor on the modem port of your Linkit. Carefully observe your readings. They update every 1/4 seconds. You can even plot a graph using opensource tools available online such as plotty or ubidots.

Step 5: Final Touches

Congrats! You've built your own humidity sensor!

Now make a humidity detection box!

You'll have a lot of fun with it sensing humidity.

Comments

author
maroelawerner (author)2015-11-28

A Linkit One is a bit of an overkill for the project.

You have a board that is capable of doing far more.

I suggest you do another recipe (sketch) that sends the data to Thingspeak via your modem router. Or to a mobile phone (cellphone) via bluetooth.

If you really want to do even better, send the data via the mobile phone network. Use SMS or GPRS.

That would show whst the Linkit One is really good for.

About This Instructable

214views

2favorites

License:

More by ssarthak598:DIY Smart Home Monitoring BottleArduino Video Game (The DIY Gift)Is My Fridge Door Open?!
Add instructable to: