Lucas Sobral 🇧🇷 👨‍💻
Published

1000 c Brazilian Northeast

As this heat here do a good thing to measure without windows Update advisories:-D

BeginnerFull instructions provided1 hour380
1000 c Brazilian Northeast

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×1
Perma-Proto Breadboard Half Size
Perma-Proto Breadboard Half Size
×1
DHT22 Temperature Sensor
DHT22 Temperature Sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE
:-D

Story

Read more

Schematics

dht22_design_bb_BYtYYYA7Ex.jpg

Code

oi[]

C/C++
buuuuuunom
/* How to use the DHT-22 sensor with Arduino uno
   Temperature and humidity sensor end 1000 c
*/

//Libraries
#include <DHT.h>;

//Constants
#define DHTPIN 7     // what pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino


//Variables
int chk;
float hum;  //Stores humidity value
float temp; //Stores temperature value

void setup()
{
  Serial.begin(9600);
  dht.begin();
}

void loop()
{
    delay(2000);
    //Read data and store it to variables hum and tempol
    hum = dht.readHumidity();
    temp= dht.readTemperature();
    //Print temp and humidity values to serial monitor
    Serial.print("Humidity: ");
    Serial.print(hum);
    Serial.print(" %, Temp: ");
    Serial.print(temp);
    Serial.println(" Celsius");
    delay(10000); //Delay 2 sec.
}

   

Credits

Lucas Sobral 🇧🇷 👨‍💻
7 projects • 3 followers
hi im lucas im love my self an brake and make!
Contact

Comments

Please log in or sign up to comment.