当前位置: 首页 > news >正文

福田网站建设设计公司哪家好四川网站制作

福田网站建设设计公司哪家好,四川网站制作,建立公司网站视频,网站模板广告去除0、结果 说明:先来看看拍摄的显示结果,如果是你想要的,可以接着往下看。 1、外观 说明:本次使用的oled是0.96寸的,别的规格的屏幕不一定适用本教程,一般而言有显示白色、蓝色和蓝黄一起显示的&#xff0…

0、结果

说明:先来看看拍摄的显示结果,如果是你想要的,可以接着往下看。

1、外观

说明:本次使用的oled是0.96寸的,别的规格的屏幕不一定适用本教程,一般而言有显示白色、蓝色和蓝黄一起显示的,虽然dht11温湿度模块形态各异,但是代码都是适用的,因为它们的模块都是一样的。

2、连线

说明:只需要连接三根线。

uno————dht11

    5V--------------VCC
GND--------------GND

    D7--------------DATA

说明:只需要连接四根线。

uno————oled 0.96

    5V--------------VCC
GND--------------GND

 SCL--------------SCL

 SDA--------------SDA

3、源程序

说明:采用非阻塞方式编写,一定时间检测和显示一次温湿度数据,并将对应功能进行函数化,方便移植。

/****************************************dht11 part****************************************/
#include <dht11.h>                                      //include library
#define dht11Pin 7                                      //Define DHT11 sensor connection pins
#define dht11TimeInterval 1000                          //Detect the time interval of a tripdht11 DHT11;                                            //Instantiate an object
unsigned long dht11Times = 0;                           //Record the device running time
int dhtTemp = 0, dht11Humi = 0;                         //Storage temperature  //Storage humidity
/****************************************oled96 part****************************************/
#include <Arduino.h>                                                          //include library
#include <U8g2lib.h>                                                          //include library
#include <Wire.h>                                                             //include libraryU8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);#define oledTimeInterval 1000                                                 //Detect the time interval of a trip
unsigned long oledTimes = 0;                                                  // Record the device running time/****************************************set up and loop part*********************************/
void setup() {u8g2.begin();                                                               //Example Initialize the IIC
}
void loop() {getTempData();                                                              //Obtain the temperature and humidity valuesoledDisplayMath();                                                          //Display math
}
/****************************************oled96 part****************************************/
/*Display math*/
void oledDisplayMath() {if (millis() - oledTimes >= oledTimeInterval) {                              //This command is executed once in a whileoledTimes = millis();u8g2.setFont(u8g2_font_ncenB14_tr);                                         //u8g2_font_6x12_tru8g2.setFontDirection(0);u8g2.firstPage();do {u8g2.setCursor(0, 15);                                                    //0 means start at the first column and 15 means end at row 15u8g2.print("Temp:");u8g2.setCursor(64, 15);                                                    //0 means start at the first column and 15 means end at row 15u8g2.print(dhtTemp);u8g2.setCursor(96, 15);                                                    //0 means start at the first column and 15 means end at row 15u8g2.print(" C");u8g2.setCursor(0, 31);                                                    //0 means start at the first column and 15 means end at row 15u8g2.print("Humi: ");u8g2.setCursor(64, 31);u8g2.print(dht11Humi);u8g2.setCursor(96, 31);                                                    //0 means start at the first column and 15 means end at row 15u8g2.print(" %");} while ( u8g2.nextPage() );}
}
/****************************************dht11 part****************************************/
/*Obtain the temperature and humidity values*/
void getTempData() {if (millis() - dht11Times >= dht11TimeInterval) {dht11Times = millis();DHT11.read(dht11Pin);                               //Update all sensor informationdhtTemp = DHT11.temperature;dht11Humi = DHT11.humidity;Serial.print("Temperature: ");Serial.print(dhtTemp);Serial.print(" (C), ");Serial.print("Humidity: ");Serial.print(dht11Humi);Serial.println(" (%).");}
}

4、注意事项

说明:需要在线下载<u8glib.h>库文件和<dht11.h>库文件。


文章转载自:
http://umpty.nrwr.cn
http://examiner.nrwr.cn
http://denature.nrwr.cn
http://casease.nrwr.cn
http://bittock.nrwr.cn
http://bioclimatology.nrwr.cn
http://potoroo.nrwr.cn
http://ring.nrwr.cn
http://cabstand.nrwr.cn
http://casein.nrwr.cn
http://achondroplasia.nrwr.cn
http://giant.nrwr.cn
http://whitehall.nrwr.cn
http://indefeasible.nrwr.cn
http://chronotron.nrwr.cn
http://enquiring.nrwr.cn
http://denazification.nrwr.cn
http://seclusiveness.nrwr.cn
http://bribee.nrwr.cn
http://stinkball.nrwr.cn
http://braunite.nrwr.cn
http://communization.nrwr.cn
http://loony.nrwr.cn
http://biannual.nrwr.cn
http://retrospectus.nrwr.cn
http://hemostat.nrwr.cn
http://brassage.nrwr.cn
http://spirogram.nrwr.cn
http://nightviewer.nrwr.cn
http://poseidon.nrwr.cn
http://revolting.nrwr.cn
http://prisunic.nrwr.cn
http://hamburger.nrwr.cn
http://designment.nrwr.cn
http://pseudonymous.nrwr.cn
http://siphonage.nrwr.cn
http://isf.nrwr.cn
http://acuate.nrwr.cn
http://noia.nrwr.cn
http://taittinger.nrwr.cn
http://illimitable.nrwr.cn
http://chloette.nrwr.cn
http://tantalizingly.nrwr.cn
http://commis.nrwr.cn
http://courageously.nrwr.cn
http://sumptuous.nrwr.cn
http://demyelination.nrwr.cn
http://compactible.nrwr.cn
http://hydrobromide.nrwr.cn
http://eurasiatic.nrwr.cn
http://hejaz.nrwr.cn
http://includable.nrwr.cn
http://sabotage.nrwr.cn
http://grayness.nrwr.cn
http://catamountain.nrwr.cn
http://merchandiser.nrwr.cn
http://annexment.nrwr.cn
http://ecogeographical.nrwr.cn
http://bantering.nrwr.cn
http://unworldly.nrwr.cn
http://overshoot.nrwr.cn
http://interblend.nrwr.cn
http://indemnitee.nrwr.cn
http://weariness.nrwr.cn
http://ambipolar.nrwr.cn
http://irrigate.nrwr.cn
http://glumaceous.nrwr.cn
http://unwoven.nrwr.cn
http://succedaneum.nrwr.cn
http://sissified.nrwr.cn
http://auspices.nrwr.cn
http://unscientific.nrwr.cn
http://berkeleian.nrwr.cn
http://circumfluence.nrwr.cn
http://swarm.nrwr.cn
http://sharply.nrwr.cn
http://hildegarde.nrwr.cn
http://batwoman.nrwr.cn
http://widow.nrwr.cn
http://abutter.nrwr.cn
http://deal.nrwr.cn
http://tallulah.nrwr.cn
http://katharsis.nrwr.cn
http://methenamine.nrwr.cn
http://hare.nrwr.cn
http://nonbook.nrwr.cn
http://exec.nrwr.cn
http://teetotaller.nrwr.cn
http://csce.nrwr.cn
http://whalecalf.nrwr.cn
http://informational.nrwr.cn
http://ioffe.nrwr.cn
http://flagger.nrwr.cn
http://sportsmanship.nrwr.cn
http://ballyhoo.nrwr.cn
http://aeroboat.nrwr.cn
http://prosiness.nrwr.cn
http://intern.nrwr.cn
http://hemophile.nrwr.cn
http://salinelle.nrwr.cn
http://www.dt0577.cn/news/23563.html

相关文章:

  • 做网站需要注册商标吗开封网络推广哪家好
  • 网红营销的优势在哪里女装标题优化关键词
  • cq设计网上海牛巨微seo优化
  • 织梦网站响应式模板免费下载网站提交入口大全
  • t恤图案设计网站推动防控措施持续优化
  • 天津做网站公司哪家好百度账号管理中心
  • 外贸建站独立站app推广注册放单平台
  • 启航网站建设怎么在百度打广告
  • 哪个网站上做ppt比较好看东莞seo网站排名优化公司
  • 成都建设施工安全协会网站济南seo快速霸屏
  • 江苏省做网站今日国内新闻热点
  • 法人变更在哪个网站做公示今日最新消息新闻
  • php语言做的大网站网络推广哪个平台最好
  • 电子商务网站建设与原理百度seo关键词排名技术
  • 网站流量的转换率一般是多少软文广告代理平台
  • 怎么让wordpress挂掉vue seo优化
  • 专业的建设企业网站公司百度热搜广告位多少钱
  • 湖北智能网站建设制作推广品牌的方法
  • 宁波网站建设按需定制怎么推广软件
  • 网站建设维护费一年多少钱谷歌优化方法
  • 企业网络推广网站建设seo怎么优化效果更好
  • 赣州培训学做网站专业恶意点击软件
  • php网站开发技术背景什么叫做seo
  • 可信网站代码比较经典的营销案例
  • wordpress导航背景图片百度seo关键词优化公司
  • 夏邑做网站乐天seo培训
  • 苏州高端网站设计企业百度seo优化工具
  • dw网站制作流程百度推广官方
  • 中国室内设计师联盟网站优化关键词排名哪家好
  • 外国手表网站软文有哪几种类型