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

婚庆网站源码烟台制作网站有哪些

婚庆网站源码,烟台制作网站有哪些,怎么添加视频到wordpress,胶州市城乡建设局网站37款传感器与模块的提法#xff0c;在网络上广泛流传#xff0c;其实Arduino能够兼容的传感器模块肯定是不止37种的。鉴于本人手头积累了一些传感器和执行器模块#xff0c;依照实践出真知#xff08;一定要动手做#xff09;的理念#xff0c;以学习和交流为目的#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, well 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?firsttime0 【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 // dont rotate the display #define FLIP180 0 // dont invert the display #define INVERT 0 // Bit-Bang the I2C bus #define USE_HW_I2C 0// Change these if youre 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 isnt inferior to hw I2C and in fact allows you to go faster on certain CPUs // The reset pin is optional and Ive 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://www.dnsts.com.cn/news/152763.html

相关文章:

  • 建网站的公司深圳给我一个网站
  • 高端网站建设加盟久久建筑网是个什么样的网站
  • 广州市品牌网站建设平台实名网站空间哪里买
  • iis 网站文件被占用昆明婚恋网站价格
  • 小米的网站设计电子商务网站建设及推广方案论文
  • 做影视网站有什么风险外贸网站建设策划
  • 做直播券的网站有多少中职电子商务主要学什么课程
  • 如何知道网站后台地址苏州企业网站建设公司价格
  • 上线了建站怎么样企业建站业务还能做吗
  • 咸宁哪个企业没有做网站网站建设基本流程流程图
  • 淘宝的网站怎么做婚庆设计效果图
  • 网站开发网站维护这行业怎么样自己怎么做商城网站视频教程
  • 专业网站建设费用包括哪些代码给WordPress添加
  • 怎么做静态网站高端网站建设 n磐石网络
  • 湖南网站建设磐石网络口碑好seo教育
  • 手机网站分享js代码专门做网页设计网站
  • 苏州淘宝网站建设网络软文怎么写
  • 2个小时学会网站建设wordpress 固定链接 nginx
  • 栖霞酒店网站设计价格上海做网站的公司哪个好
  • 江苏cms建站系统做网站的费用是多少钱
  • 宿迁网站建设宿迁区块链外包开发
  • 甘肃兰州做网站如何建设网站安全
  • 有哪些可以免费推广的网站wordpress内容分享微信
  • 东至县住房和城乡建设网站门户网站建设的公司
  • 四平市住房和畅想建设局网站微信公众平台开发者
  • 免费给别人开发网站找个网站懂的网站
  • 超星网站开发实战答案中国建设银行广东分行网站
  • 开设网站需要什么网站开发过程中感想
  • 用手机可以做网站嘛wordpress腾讯企业邮箱
  • 帮一个公司做网站多少钱山东省住房和城乡建设厅厅长