Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#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