Arduino SSD1306_OLED不依赖库直驱显示

上传者: whqsz | 上传时间: 2021-07-30 21:37:54 | 文件大小: 479KB | 文件类型: RAR
引用的第三方SSD1306库驱动都是申请1KB芯片内存做为显示缓冲,这样在不添加其它功能代码情况下编译就占用50%的内存空间。百试不爽,只好用现成驱动封装一个不申请空间的SSD1306库了。中英文混合显示。 #include "OLED.h" OLED oled; void setup(void){ Serial.begin(9600); oled.Init(); oled.Clear(); oled.ShowString(88, 0, 12, "POWER", 1); oled.ShowString(88, 1, 12, "20.4V", 1); oled.ShowCHinese(0, 0, "95%", 1); oled.ShowCHinese(28, 0, "{||||}", 1); //功率条显示 oled.ShowString(88, 2, 12, "T:05M", 1); oled.ShowString(88, 4, 16, " ", 0); //空白符填充 oled.ShowNum(94, 4, 328, 3, 16, 0); //设置温度显示 oled.ShowString(119, 4, 16, "`", 0); //小温度圈 oled.ShowCHinese(96, 6, "箭 ", 1); //oled.Pixel(100, 60); } void loop(void){ for (u16 i = 0; i < 255; i++) { //oled.BrigControl(i); //屏幕亮度设置 oled.ShowNum48(0, 3, i, 3, 1); oled.ShowCHinese(72, 3, "圈", 1); //大温度圈 oled.ShowString(118, 6, 16, "~", 1); //加热点 oled.ShowCHinese(28, 0, "{||} ", 1); //功率条显示 oled.ShowCHinese(0, 0, "65", 1); delay(10); oled.ShowString(118, 6, 16, " ", 1); oled.ShowCHinese(28, 0, "{|||} ", 1); //功率条显示 oled.ShowCHinese(0, 0, "80", 1); delay(10); } }

文件下载

资源详情

[{"title":"( 33 个子文件 479KB ) Arduino SSD1306_OLED不依赖库直驱显示","children":[{"title":"OLEDTEST","children":[{"title":"OLEDTEST.vcxproj.filters <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"OLED.h <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false},{"title":"__vm","children":[{"title":".OLEDTEST.vsarduino.h <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"Upload.vmps.xml <span style='color:#111;'> 20.05KB </span>","children":null,"spread":false},{"title":"Compile.vmps.xml <span style='color:#111;'> 20.05KB </span>","children":null,"spread":false},{"title":"Configuration.Debug.vmps.xml <span style='color:#111;'> 19.90KB </span>","children":null,"spread":false}],"spread":true},{"title":"Debug","children":[{"title":"OLEDTEST.elf <span style='color:#111;'> 44.66KB </span>","children":null,"spread":false},{"title":"OLED.elf <span style='color:#111;'> 18.70KB </span>","children":null,"spread":false},{"title":"SSD1306.cpp.o <span style='color:#111;'> 30.39KB </span>","children":null,"spread":false},{"title":"OLED.cpp.d <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"OLEDTEST.ino.elf <span style='color:#111;'> 44.66KB </span>","children":null,"spread":false},{"title":"OLED.with_bootloader.hex <span style='color:#111;'> 9.28KB </span>","children":null,"spread":false},{"title":"OLEDTEST.hex <span style='color:#111;'> 36.68KB </span>","children":null,"spread":false},{"title":"OLEDTEST.ino.hex <span style='color:#111;'> 36.68KB </span>","children":null,"spread":false},{"title":"OLEDTEST.with_bootloader.hex <span style='color:#111;'> 41.13KB </span>","children":null,"spread":false},{"title":"OLED.ino.with_bootloader.hex <span style='color:#111;'> 9.28KB </span>","children":null,"spread":false},{"title":"core.a <span style='color:#111;'> 311.11KB </span>","children":null,"spread":false},{"title":"OLED.ino.elf <span style='color:#111;'> 18.70KB </span>","children":null,"spread":false},{"title":"board.buildinfo <span style='color:#111;'> 22.23KB </span>","children":null,"spread":false},{"title":"OLED.cpp.o <span style='color:#111;'> 58.11KB </span>","children":null,"spread":false},{"title":"OLEDTEST.ino.with_bootloader.hex <span style='color:#111;'> 41.13KB </span>","children":null,"spread":false},{"title":"SSD1306.cpp.d <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"OLED.hex <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false},{"title":"OLEDTEST.cpp.o <span style='color:#111;'> 10.91KB </span>","children":null,"spread":false},{"title":"OLED.ino.hex <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false},{"title":"OLEDTEST.cpp.d <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":false},{"title":"OLEDTEST.v12.suo <span style='color:#111;'> 39.50KB </span>","children":null,"spread":false},{"title":"OLEDTEST.vcxproj <span style='color:#111;'> 5.10KB </span>","children":null,"spread":false},{"title":"OLEDTEST.ino <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"OLEDTEST.sln <span style='color:#111;'> 961B </span>","children":null,"spread":false},{"title":"OLEDTEST.vcxproj.user <span style='color:#111;'> 165B </span>","children":null,"spread":false},{"title":"FONT.h <span style='color:#111;'> 43.12KB </span>","children":null,"spread":false},{"title":"OLED.cpp <span style='color:#111;'> 9.44KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明