Home / Wiki / Sensor / Environment
Humidity sensor module(HR202)-variable

Introduction

Humidity sensor module is sensitivity to the humidity in surrounding environment, it is based on the HR202. There is a LM393 used to make the digital signal, the variable resistance make it more useful to set the threshold you want to set.  

Technical data

VCC: 3.3 to 5V

DO: digital output


Usage

[code]

int LED=13;                     //build-in LED

const int  HR202=4;             

 

void setup() {

pinMode(HR202, INPUT);         //set HR202 as input pin

Serial.begin(9600);

}

 

void loop() {

  

  int value=digitalRead(HR202);  //read digital data from HR202 and send it to value1

  LED=value;                     //assign value' value to LED

  Serial.println(value);

}

 

[/code]


Resource

Program

Schematic

Datesheet