Introduction: LinkitONE Room Humidity Sensor

About: I build products which solve real world problems.

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


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.



#include "DHT.h"

#define DHTPIN A0

//#define DHTTYPE DHT11


void setup() {


Serial.println("DHTxx test!");



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: ");


} }


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.