Stap 7: Code
Code
Download de Code van de link en open het met Arduino IDE.
<p>//WEATHER BOX tutorial!<br>//Get more tutorials on --> --> --><br>//"MIYMAKERS" https://miymakers.wordpress.com/</p><p>#include <dht.h></dht.h></p><p>#include <br><liquidcrystal.h></liquidcrystal.h></p><p>#define dht_dpin A1 //no ; here. Set equal to channel sensor is on<br>dht DHT;</p><p>LiquidCrystal lcd(12, 11, 5, 4, 3, 2);<br>void setup(){<br> <br> ;lcd.begin(16, 2);<br> lcd.print("TEMP HUMIDITY");<br> Serial.begin(57600); <br>}<br>void loop(){<br> lcd.setCursor(1,3);<br> DHT.read11(dht_dpin);<br> </p><p> //lcd.print(abs(moisture)); <br> //Serial.println(moisture);<br> lcd.print(round(DHT.temperature));<br> lcd.print("C "); <br> lcd.print(round(DHT.humidity));<br> lcd.print("% "); <br>}</p>