All pictures are for illustrative purposes only.
Store address and hours
location_on 4131 Fraser St. Vancouver BC Get Directions
phone 604-875-1993 Call us
access_time Hours
Monday - Friday | 9AM - 5:30PM |
Saturday - Sunday & Holidays | Closed | See Holiday Hours |
Open • Closes at 5:30PM
close
Menu
-
close
-
CATEGORIES
-
-
-
-
-
-
-
-
-
-
-
-
-
Featured Item
-
-
-
-
-
-
-
more electrical devices
More electrical devices -
more electrical devices
More electrical devices
-
-
more electrical devices
More electrical devices -
more electrical devices
More electrical devices
-
-
Featured Items
-
more electrical devices
More electrical devices
-
-
-
-
-
-
-
-
Featured Item
-
-
-
-
-
-
-
Featured Items
-
-
-
-
-
-
-
-
Featured Items
-
-
-
Featured Items
-
-
-
-
-
-
-
-
-
-
-
Featured Items
-
-
-
-
-
-
-
-
-
Featured Items
-
-
-
-
-
-
featured
-
-
-
Featured Items
-
-
-
-
-
-
-
Featured Items
-
-
-
-
-
Featured Items
-
-
-
-
Featured Products
-
-
-
More Filaments
More Filaments
-
-
-
-
more electrical devices
More electrical devices
-
-
more electrical devices
More electrical devices
-
-
Electrical Devices
-
-
-
more electrical devices
More electrical devices
-
-
-
-
-
-
-
Featured Products
-
-
-
Featured Products
-
-
-
-
BRANDS
-
-
-
-
Brands/Manufacturers
-
-
Manufacturer 3
-
-
- PROJECTS
-
COMMUNITY
-
- SALE Sale
DIGITAL HUMIDITY AND TEMPERATURE SENSOR DHT22
PID# 7375
13,50 CA$ EACH
Description
Features:
- 3.3-6V Input
- 1-1.5mA measuring current
- 40-50 uA standby current
- Humidity from 0-100% RH
- -40 - 80 degrees C temperature range
- +-2% RH accuracy
- +-0.5 degrees C
- #include"DHT.h"
- #define DHTPIN 2// what pin we're connected to
- #define DHTTYPE DHT22 // DHT 22 (AM2302)
- #define fan 4
- int maxHum =60;
- int maxTemp =40;
- DHT dht(DHTPIN, DHTTYPE);
- void setup(){
- pinMode(fan, OUTPUT);
- Serial.begin(9600);
- dht.begin();
- }
- void loop(){
- // Wait a few seconds between measurements.
- delay(2000);
- // Reading temperature or humidity takes about 250 milliseconds!
- // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
- float h = dht.readHumidity();
- // Read temperature as Celsius
- float t = dht.readTemperature();
- // Check if any reads failed and exit early (to try again).
- if(isnan(h)|| isnan(t)){
- Serial.println("Failed to read from DHT sensor!");
- return;
- }
- if(h > maxHum || t > maxTemp){
- digitalWrite(fan, HIGH);
- }else{
- digitalWrite(fan, LOW);
- }
- Serial.print("Humidity: ");
- Serial.print(h);
- Serial.print(" %t");
- Serial.print("Temperature: ");
- Serial.print(t);
- Serial.println(" *C ");
- }