ใบงานการทดลองที่ 15 งานโปรแกรมการอ่านค่าอุณหภูมิและค่าความชื้นจาก DHT11 ส่วนประกอบงานวิชา การเขียนโปรแกรมคอมฯ
![รูปภาพ](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzEZ0J1b2IYsEgbPw6MiPlDix4PA6ZsMqUQGLNsL_94XLk7Oy_nPqu_6TpaEYrEybMzRGWTS0ZrvaPPxRijJx27LNh7qJ6d2Su09z9BH48Q12fxC_imhnS4LkTAdnw_Q7l9f0HyQSgMZI/s640/15.1.png)
ใบงานการทดลองที่ 15 #include <LedControl.h> #include <DHT11.h> int pin=4; DHT11 dht11(pin); LedControl lc=LedControl(8,10,9,1); void show2digit(int h,int t) { int seg1,seg2,seg3,seg4; seg1 = h%10; seg2 = h/10; lc.setDigit(0,4,seg1,false); lc.setDigit(0,5,seg2,false); seg3 = t%10; seg4 = t/10; lc.setDigit(0,0,seg3,false); lc.setDigit(0,1,seg4,false); delay(300); } void setup() { Serial.begin(9600); while (!Serial) { ; } lc.shutdown(0,false); lc.setIntensity(0,5); lc.clearDisplay(0); } void loop() { int err; float temp, humi; if((err=dht11.read(humi, ...