亚洲春色中文字幕久久久-三上亚,一吻二脱三床四吻胸,国产真实伦对白视频全集,在线毛片观看,精品成品入口黄网,国产毛aⅴ片久久久,亚洲AV色香蕉一区二区三区老师,萧皇后A级艳片,色情日本视频更新,99久久亚洲精品日本无码

標(biāo)題: arduino oled+dht11顯示 [打印本頁(yè)]

作者: lth977    時(shí)間: 2017-12-23 12:53
標(biāo)題: arduino oled+dht11顯示
在網(wǎng)上找了很久,都沒(méi)有找到有關(guān)的資料。就自己改了程序[attach]92884[/attach]庫(kù)文件什么的都在壓縮包了
#include <Arduino.h>
#include <U8g2lib.h>
#include <dht11.h>
dht11 DHT11;
#define DHT11PIN D6  //可改接口,這是我D1開(kāi)發(fā)板的
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ D3, /* data=*/ D4, /* reset=*/ U8X8_PIN_NONE);   // ESP32 Thing, pure SW emulated I2C
void setup(void) {
  Serial.begin(9600);
  u8g2.begin();  
  u8g2.enableUTF8Print();       // enable UTF8 support for the Arduino print() function  
}  

void loop(void) {  
  int chk = DHT11.read(DHT11PIN);
    Serial.print("Humidity (%): ");
  Serial.println((float)DHT11.humidity, 2);

  Serial.print("Temperature (oC): ");
  Serial.println((float)DHT11.temperature, 2);
delay(2000);
  u8g2.setFont(u8g2_font_unifont_t_chinese2);  // use chinese2 for all the glyphs of "你好世界"  
  u8g2.setFontDirection(0);  
  u8g2.clearBuffer();  
  u8g2.setCursor(0, 15);  
  u8g2.print("Humidity (%):");  
    u8g2.setCursor(0, 28);  
  u8g2.print((float)DHT11.humidity, 2);  
  u8g2.setCursor(0, 40);  
  u8g2.print("Temperature (oC): ");       // Chinese "Hello World"  
   u8g2.setCursor(0, 60);  
  u8g2.print((float)DHT11.temperature, 2);       // Chinese "Hello World"  
  u8g2.sendBuffer();  

  delay(1000);  
}  

原理圖: 無(wú)
仿真: 無(wú)
代碼: 代碼.7z (3.04 MB, 下載次數(shù): 46)

作者: wo3513456    時(shí)間: 2024-1-17 13:18
request for member 'read' in 'DHT11', which is of non-class type 'const uint8_t' {aka 'const unsigned char'}
作者: wo3513456    時(shí)間: 2024-1-17 13:19
request for member 'read' in 'DHT11', which is of non-class type 'const uint8_t' {aka 'const unsigned char'}什么原因吖




歡迎光臨 (http://www.denmoz.com/bbs/) Powered by Discuz! X3.1