Skip to content

Commit

Permalink
Create Temperature-reactive heating
Browse files Browse the repository at this point in the history
#include <Arduino.h>
#include <DHT11.h>
#define ZS03_Sensor_PIN A0     //온습도 센서 핀
#define OutPIN 5     //
DHT11 dht11(ZS03_Sensor_PIN);
float temp, humi; //온도 습도
int OutValue = 0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(ZS03_Sensor_PIN,INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
     dht11.read(humi,temp);
     Serial.print("T");
     Serial.print(temp);
     Serial.println(".");
     if(temp <21){
         OutValue = 1024;
         analogWrite(OutPIN,OutValue);
     }
}
  • Loading branch information
HyunseungLee-CRC committed Dec 12, 2020
1 parent d11c506 commit 6b0d674
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Temperature-reactive heating
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 6b0d674

Please sign in to comment.