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

上海最新的疫情数据seo优化外包顾问

上海最新的疫情数据,seo优化外包顾问,游戏页面,时时彩网站如何做代理37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的&#x…

37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是不止37种的。鉴于本人手头积累了一些传感器和执行器模块,依照实践出真知(一定要动手做)的理念,以学习和交流为目的,这里准备逐一动手试试多做实验,不管成功与否,都会记录下来——小小的进步或是搞不掂的问题,希望能够抛砖引玉。

【Arduino】168种传感器模块系列实验(资料代码+仿真编程+图形编程)
实验一百八十七:1.3寸OLED液晶屏 I2C IIC通信 4针模块 1106/1306驱动 128*64像素

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

【Arduino】168种传感器模块系列实验(资料代码+图形编程+仿真编程)
实验一百八十一:1.3寸OLED液晶屏 I2C IIC通信 4针模块 1106/1306驱动 132*64像素
项目之三:基于Adafruit_SH1106库的标准屏幕测试

实验开源代码

/*【Arduino】168种传感器模块系列实验(资料代码+图形编程+仿真编程)实验一百八十一:1.3寸OLED液晶屏 I2C IIC通信 4针模块 1106/1306驱动 132*64像素项目之三:基于Adafruit_SH1106库的标准屏幕测试实验接线:oled模块    Ardunio UnoGND---------GND接地线VCC---------5V 接电源SDA---------D6SCL ------- D4
*///#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SH1106.h>#define OLED_RESET 4
Adafruit_SH1106 display(OLED_RESET);#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH  16
static const unsigned char PROGMEM logo16_glcd_bmp[] =
{ B00000000, B11000000,B00000001, B11000000,B00000001, B11000000,B00000011, B11100000,B11110011, B11100000,B11111110, B11111000,B01111110, B11111111,B00110011, B10011111,B00011111, B11111100,B00001101, B01110000,B00011011, B10100000,B00111111, B11100000,B00111111, B11110000,B01111100, B11110000,B01110000, B01110000,B00000000, B00110000
};#if (SH1106_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SH1106.h!");
#endifvoid setup()   {Serial.begin(9600);// by default, we'll generate the high voltage from the 3.3v line internally! (neat!)display.begin(SH1106_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)// init done// Show image buffer on the display hardware.// Since the buffer is intialized with an Adafruit splashscreen// internally, this will display the splashscreen.display.display();delay(2000);// Clear the buffer.display.clearDisplay();// draw a single pixeldisplay.drawPixel(10, 10, WHITE);// Show the display buffer on the hardware.// NOTE: You _must_ call display after making any drawing commands// to make them visible on the display hardware!display.display();delay(2000);display.clearDisplay();// draw many linestestdrawline();display.display();delay(2000);display.clearDisplay();// draw rectanglestestdrawrect();display.display();delay(2000);display.clearDisplay();// draw multiple rectanglestestfillrect();display.display();delay(2000);display.clearDisplay();// draw mulitple circlestestdrawcircle();display.display();delay(2000);display.clearDisplay();// draw a white circle, 10 pixel radiusdisplay.fillCircle(display.width() / 2, display.height() / 2, 10, WHITE);display.display();delay(2000);display.clearDisplay();testdrawroundrect();delay(2000);display.clearDisplay();testfillroundrect();delay(2000);display.clearDisplay();testdrawtriangle();delay(2000);display.clearDisplay();testfilltriangle();delay(2000);display.clearDisplay();// draw the first ~12 characters in the fonttestdrawchar();display.display();delay(2000);display.clearDisplay();// draw scrolling text/* testscrolltext();delay(2000);display.clearDisplay();*/// text display testsdisplay.setTextSize(1);display.setTextColor(WHITE);display.setCursor(0, 0);display.println("Hello, world!");display.setTextColor(BLACK, WHITE); // 'inverted' textdisplay.println(3.141592);display.setTextSize(2);display.setTextColor(WHITE);display.print("0x"); display.println(0xDEADBEEF, HEX);display.display();delay(2000);// miniature bitmap displaydisplay.clearDisplay();display.drawBitmap(30, 16,  logo16_glcd_bmp, 16, 16, 1);display.display();// invert the displaydisplay.invertDisplay(true);delay(1000);display.invertDisplay(false);delay(1000);// draw a bitmap icon and 'animate' movementtestdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH);
}void loop() {
}void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {uint8_t icons[NUMFLAKES][3];// initializefor (uint8_t f = 0; f < NUMFLAKES; f++) {icons[f][XPOS] = random(display.width());icons[f][YPOS] = 0;icons[f][DELTAY] = random(5) + 1;Serial.print("x: ");Serial.print(icons[f][XPOS], DEC);Serial.print(" y: ");Serial.print(icons[f][YPOS], DEC);Serial.print(" dy: ");Serial.println(icons[f][DELTAY], DEC);}while (1) {// draw each iconfor (uint8_t f = 0; f < NUMFLAKES; f++) {display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, WHITE);}display.display();delay(200);// then erase it + move itfor (uint8_t f = 0; f < NUMFLAKES; f++) {display.drawBitmap(icons[f][XPOS], icons[f][YPOS],  logo16_glcd_bmp, w, h, BLACK);// move iticons[f][YPOS] += icons[f][DELTAY];// if its gone, reinitif (icons[f][YPOS] > display.height()) {icons[f][XPOS] = random(display.width());icons[f][YPOS] = 0;icons[f][DELTAY] = random(5) + 1;}}}
}void testdrawchar(void) {display.setTextSize(1);display.setTextColor(WHITE);display.setCursor(0, 0);for (uint8_t i = 0; i < 168; i++) {if (i == '\n') continue;display.write(i);if ((i > 0) && (i % 21 == 0))display.println();}display.display();
}void testdrawcircle(void) {for (int16_t i = 0; i < display.height(); i += 2) {display.drawCircle(display.width() / 2, display.height() / 2, i, WHITE);display.display();}
}void testfillrect(void) {uint8_t color = 1;for (int16_t i = 0; i < display.height() / 2; i += 3) {// alternate colorsdisplay.fillRect(i, i, display.width() - i * 2, display.height() - i * 2, color % 2);display.display();color++;}
}void testdrawtriangle(void) {for (int16_t i = 0; i < min(display.width(), display.height()) / 2; i += 5) {display.drawTriangle(display.width() / 2, display.height() / 2 - i,display.width() / 2 - i, display.height() / 2 + i,display.width() / 2 + i, display.height() / 2 + i, WHITE);display.display();}
}void testfilltriangle(void) {uint8_t color = WHITE;for (int16_t i = min(display.width(), display.height()) / 2; i > 0; i -= 5) {display.fillTriangle(display.width() / 2, display.height() / 2 - i,display.width() / 2 - i, display.height() / 2 + i,display.width() / 2 + i, display.height() / 2 + i, WHITE);if (color == WHITE) color = BLACK;else color = WHITE;display.display();}
}void testdrawroundrect(void) {for (int16_t i = 0; i < display.height() / 2 - 2; i += 2) {display.drawRoundRect(i, i, display.width() - 2 * i, display.height() - 2 * i, display.height() / 4, WHITE);display.display();}
}void testfillroundrect(void) {uint8_t color = WHITE;for (int16_t i = 0; i < display.height() / 2 - 2; i += 2) {display.fillRoundRect(i, i, display.width() - 2 * i, display.height() - 2 * i, display.height() / 4, color);if (color == WHITE) color = BLACK;else color = WHITE;display.display();}
}void testdrawrect(void) {for (int16_t i = 0; i < display.height() / 2; i += 2) {display.drawRect(i, i, display.width() - 2 * i, display.height() - 2 * i, WHITE);display.display();}
}void testdrawline() {for (int16_t i = 0; i < display.width(); i += 4) {display.drawLine(0, 0, i, display.height() - 1, WHITE);display.display();}for (int16_t i = 0; i < display.height(); i += 4) {display.drawLine(0, 0, display.width() - 1, i, WHITE);display.display();}delay(250);display.clearDisplay();for (int16_t i = 0; i < display.width(); i += 4) {display.drawLine(0, display.height() - 1, i, 0, WHITE);display.display();}for (int16_t i = display.height() - 1; i >= 0; i -= 4) {display.drawLine(0, display.height() - 1, display.width() - 1, i, WHITE);display.display();}delay(250);display.clearDisplay();for (int16_t i = display.width() - 1; i >= 0; i -= 4) {display.drawLine(display.width() - 1, display.height() - 1, i, 0, WHITE);display.display();}for (int16_t i = display.height() - 1; i >= 0; i -= 4) {display.drawLine(display.width() - 1, display.height() - 1, 0, i, WHITE);display.display();}delay(250);display.clearDisplay();for (int16_t i = 0; i < display.height(); i += 4) {display.drawLine(display.width() - 1, 0, 0, i, WHITE);display.display();}for (int16_t i = 0; i < display.width(); i += 4) {display.drawLine(display.width() - 1, 0, i, display.height() - 1, WHITE);display.display();}delay(250);
}/*void testscrolltext(void) {display.setTextSize(2);display.setTextColor(WHITE);display.setCursor(10,0);display.clearDisplay();display.println("scroll");display.display();display.startscrollright(0x00, 0x0F);delay(2000);display.stopscroll();delay(1000);display.startscrollleft(0x00, 0x0F);delay(2000);display.stopscroll();delay(1000);display.startscrolldiagright(0x00, 0x07);delay(2000);display.startscrolldiagleft(0x00, 0x07);delay(2000);display.stopscroll();}*/

实验场景图

在这里插入图片描述
在这里插入图片描述

【Arduino】168种传感器模块系列实验(资料代码+图形编程+仿真编程)
实验一百八十一:1.3寸OLED液晶屏 I2C IIC通信 4针模块 1106/1306驱动 132*64像素
项目之三:基于Adafruit_SH1106库的标准屏幕测试显示

实验视频剪辑

https://v.youku.com/v_show/id_XNTgwOTMyMTk3Ng==.html?firsttime=0

在这里插入图片描述
【Arduino】168种传感器模块系列实验(资料代码+图形编程+仿真编程)
实验一百八十一:1.3寸OLED液晶屏 I2C IIC通信 4针模块 1106/1306驱动 132*64像素
项目之四:初始化ss_oled库

实验开源代码

/*【Arduino】168种传感器模块系列实验(资料代码+图形编程+仿真编程)实验一百八十一:1.3寸OLED液晶屏 I2C IIC通信 4针模块 1106/1306驱动 132*64像素项目之四:初始化ss_oled库实验接线:oled模块    Ardunio UnoGND---------GND接地线VCC---------5V 接电源SDA---------D6SCL ------- D4
*/#include <ss_oled.h>// Use -1 for the Wire library default pins
// or specify the pin numbers to use with the Wire library or bit banging on any GPIO pins
// These are reversed because I did straight-through wiring for my SSD1306
// and it has the 4-pin header as GND,VCC,SCL,SDA, but the GROVE connector is
// GND,VCC,SDA,SCL
#define GROVE_SDA_PIN 32
#define GROVE_SCL_PIN 26
// These are the pin numbers for the M5Stack Atom default I2C
#define SDA_PIN 8
#define SCL_PIN 9
// Set this to -1 to disable or the GPIO pin number connected to the reset
// line of your display if it requires an external reset
#define RESET_PIN -1
// let ss_oled figure out the display address
#define OLED_ADDR -1
// don't rotate the display
#define FLIP180 0
// don't invert the display
#define INVERT 0
// Bit-Bang the I2C bus
#define USE_HW_I2C 0// Change these if you're using different OLED displays
#define MY_OLED1 OLED_128x64
#define MY_OLED2 OLED_128x64// 2 copies of the SSOLED structure. Each structure is about 56 bytes
// There is no limit to the number of simultaneous displays which can be controlled by ss_oled 
SSOLED ssoled[2];void setup() {
char *msgs[] = {(char *)"SSD1306 @ 0x3C", (char *)"SSD1306 @ 0x3D",(char *)"SH1106 @ 0x3C",(char *)"SH1106 @ 0x3D"};
int rc;
// The I2C SDA/SCL pins set to -1 means to use the default Wire library
// If pins were specified, they would be bit-banged in software
// This isn't inferior to hw I2C and in fact allows you to go faster on certain CPUs
// The reset pin is optional and I've only seen it needed on larger OLEDs (2.4")
//    that can be configured as either SPI or I2C
//
//oledInit(SSOLED *, type, oled_addr, rotate180, invert, bWire, SDA_PIN, SCL_PIN, RESET_PIN, speed)rc = oledInit(&ssoled[0], MY_OLED1, OLED_ADDR, FLIP180, INVERT, 1, SDA_PIN, SCL_PIN, RESET_PIN, 400000L); // use standard I2C bus at 400Khzif (rc != OLED_NOT_FOUND){oledFill(&ssoled[0], 0, 1);oledWriteString(&ssoled[0], 0,0,0,msgs[rc], FONT_NORMAL, 0, 1);oledWriteString(&ssoled[0], 0,8,3,(char *)"Display", FONT_STRETCHED, 0, 1);oledWriteString(&ssoled[0], 0,56,6,(char *)"0", FONT_STRETCHED, 0, 1);}
rc = oledInit(&ssoled[1], MY_OLED2, OLED_ADDR, FLIP180, INVERT, 0, GROVE_SDA_PIN, GROVE_SCL_PIN, RESET_PIN, 400000L); // use standard I2C bus at 400Khzif (rc != OLED_NOT_FOUND){oledFill(&ssoled[1], 0, 1);oledSetTextWrap(&ssoled[1], 1);oledWriteString(&ssoled[1], 0,0,0,msgs[rc], FONT_SMALL, 0, 1);oledWriteString(&ssoled[1], 0,4,2,(char *)"Display", FONT_NORMAL, 0, 1);oledWriteString(&ssoled[1], 0,28,3,(char *)"1", FONT_NORMAL, 0, 1);}
} /* setup() */void loop() {// put your main code here, to run repeatedly:} /* loop() */

实验场景图

在这里插入图片描述


文章转载自:
http://dinncoruffianize.bkqw.cn
http://dinnconaphtha.bkqw.cn
http://dinncodisproportional.bkqw.cn
http://dinncovulnerable.bkqw.cn
http://dinncoedison.bkqw.cn
http://dinncodeasil.bkqw.cn
http://dinncoqube.bkqw.cn
http://dinncoslouching.bkqw.cn
http://dinncosemistrong.bkqw.cn
http://dinncochat.bkqw.cn
http://dinncoinstruct.bkqw.cn
http://dinncowaldo.bkqw.cn
http://dinncoguienne.bkqw.cn
http://dinncofalsism.bkqw.cn
http://dinncozagreus.bkqw.cn
http://dinncohowsoever.bkqw.cn
http://dinnconetting.bkqw.cn
http://dinncojook.bkqw.cn
http://dinncobarquisimeto.bkqw.cn
http://dinncounpresuming.bkqw.cn
http://dinncoembryonic.bkqw.cn
http://dinncobea.bkqw.cn
http://dinncoemotion.bkqw.cn
http://dinncobackpedal.bkqw.cn
http://dinncomonistical.bkqw.cn
http://dinncoprosify.bkqw.cn
http://dinncochine.bkqw.cn
http://dinncovassalage.bkqw.cn
http://dinncolockean.bkqw.cn
http://dinncocrusian.bkqw.cn
http://dinncomontevideo.bkqw.cn
http://dinncosadistic.bkqw.cn
http://dinncohaematozoon.bkqw.cn
http://dinncostamineal.bkqw.cn
http://dinncoliniment.bkqw.cn
http://dinncochaffing.bkqw.cn
http://dinncorepose.bkqw.cn
http://dinncoultrasonication.bkqw.cn
http://dinncoboult.bkqw.cn
http://dinncohardcase.bkqw.cn
http://dinncoxyloglyphy.bkqw.cn
http://dinncoparotid.bkqw.cn
http://dinncospasmolysis.bkqw.cn
http://dinncoaccused.bkqw.cn
http://dinncolavabo.bkqw.cn
http://dinncomemento.bkqw.cn
http://dinncorelievable.bkqw.cn
http://dinncopurlieu.bkqw.cn
http://dinncorenewable.bkqw.cn
http://dinncooverpeopled.bkqw.cn
http://dinncomagellan.bkqw.cn
http://dinncoinfructescence.bkqw.cn
http://dinncofaux.bkqw.cn
http://dinncothoron.bkqw.cn
http://dinncoincompliance.bkqw.cn
http://dinncoisentropic.bkqw.cn
http://dinncoloamless.bkqw.cn
http://dinncocounterphobic.bkqw.cn
http://dinncobronco.bkqw.cn
http://dinncotrilogy.bkqw.cn
http://dinncoarride.bkqw.cn
http://dinncorisible.bkqw.cn
http://dinncocraze.bkqw.cn
http://dinncobooklore.bkqw.cn
http://dinncocholedochostomy.bkqw.cn
http://dinncocraniometrical.bkqw.cn
http://dinncoferia.bkqw.cn
http://dinncokennedy.bkqw.cn
http://dinncotoxicity.bkqw.cn
http://dinncoculturology.bkqw.cn
http://dinncothionate.bkqw.cn
http://dinncoscreechy.bkqw.cn
http://dinncoimmunopathology.bkqw.cn
http://dinncopenlight.bkqw.cn
http://dinncomicrocomputer.bkqw.cn
http://dinncohoar.bkqw.cn
http://dinncoiby.bkqw.cn
http://dinncoclinique.bkqw.cn
http://dinncoarts.bkqw.cn
http://dinncooleometer.bkqw.cn
http://dinncorhapidosome.bkqw.cn
http://dinncocapitular.bkqw.cn
http://dinncosinological.bkqw.cn
http://dinncodietitian.bkqw.cn
http://dinncopussley.bkqw.cn
http://dinncofagot.bkqw.cn
http://dinncoambilingual.bkqw.cn
http://dinncopylorospasm.bkqw.cn
http://dinncospartacus.bkqw.cn
http://dinncocompaginate.bkqw.cn
http://dinncofiberboard.bkqw.cn
http://dinncoimpaludism.bkqw.cn
http://dinncoxns.bkqw.cn
http://dinncofoamflower.bkqw.cn
http://dinncoacademize.bkqw.cn
http://dinncobusboy.bkqw.cn
http://dinncocubicle.bkqw.cn
http://dinncodcvo.bkqw.cn
http://dinnconctm.bkqw.cn
http://dinncopogrom.bkqw.cn
http://www.dinnco.com/news/1669.html

相关文章:

  • 如何制作app网站今日特大军事新闻
  • 2018做网站赚钱不淘宝运营主要做些什么
  • 网站上上传图片 怎么做国内网站建设公司
  • 漯河做网站的公司最有效的15个营销方法
  • 陕西网站制作公司排名seo工资待遇怎么样
  • 广州红盾信息门户网站不受国内限制的搜索引擎
  • 做一个高端网站多少钱国外搜索引擎网址
  • 旅游营销型网站b站2023年免费入口
  • 做微商做什么网站比较好关键词优化靠谱推荐
  • 国外知名网站排行客源软件哪个最好
  • 英语翻译动态网站开发武汉好的seo优化网
  • 做聊天网站的视频教程下拉关键词排名
  • 卫浴网站怎么做seo做的比较好的公司
  • 商业网站建设设计装饰杭州seo公司排名
  • 沙洋县住房和城乡建设局网站湖南产品网络推广业务
  • 济南做网站价格百度搜索大数据
  • 静态网站开发篇市场营销案例
  • 仓储服务 东莞网站建设 技术支持湖南长沙今日疫情
  • 天津做网站设计公司宽带推广方案
  • 珠海动态网站制作外包百度seo排名优化系统
  • 大理网站开发关键词排名点击软件首页
  • 如何做各大网站广告链接搜索引擎营销的实现方法有哪些
  • 2014网站推广方案免费有效的推广平台
  • 太原网站域名开发线上网络推广怎么做
  • 做网站为什么要投资钱网络营销的方法有哪些?举例说明
  • 网站建设了解和生活爱辽宁免费下载安装
  • 广州市网站集约化建设工作要求黑龙江新闻头条最新消息
  • 娄底360seo优化公司学seo优化
  • 功能网站开发多少钱靠谱的seo收费
  • 绵阳市网站建设公司windows优化大师是病毒吗