#include <Adafruit_NeoPixel.h>
#include <DHT.h>
int dhtpin = 2;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, 12);
DHT dht(dhtpin, DHT22);
void setup(){
Serial.begin(9600);
strip.begin();
dht.begin();
}
int setcolor(uint32_t color){
for (int i = 0; i<16; i++){
strip.setPixelColor(i, color);
strip.show();
delay(250);
}
}
void loop(){
float temp = dht.readTemperature();
float humid = dht.readHumidity();
if (temp<45 && humid<45){
setcolor(strip.Color(0,255,0));
delay(250);
}
else{
setcolor(strip.Color(255,255,0));
delay(250);
}
}