首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Wemos - oled sparkfun打印文本不显示

Wemos - oled sparkfun打印文本不显示
EN

Stack Overflow用户
提问于 2016-04-21 19:43:25
回答 1查看 904关注 0票数 1

我使用的是带有wemos的led矩阵屏蔽(http://www.wemos.cc/Products/oled_shield.html)。我使用的是Arduino IDE。示例可以完美地工作(https://github.com/wemos/D1_mini_Examples/tree/master/04.Shields/OLED_Shield/Use_SparkFun_Library)

但是当我尝试打印文本时,屏幕仍然是空的。以下是我的代码

代码语言:javascript
复制
#include <Wire.h> 
#include <SFE_MicroOLED.h>  // Include the SFE_MicroOLED library


#define PIN_RESET 255
#define DC_JUMPER 0


MicroOLED oled(PIN_RESET, DC_JUMPER);

void setup()
{
  oled.begin();
  oled.clear(ALL);
  oled.clear(PAGE);
  oled.display(); 

  oled.setFontType(0);
  oled.setCursor(0, 0);
  oled.print("Hello, world");
  oled.display();
}

void loop()
{ 
}

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2016-04-23 03:48:56

我解决了这个问题。我修改了SFE_MicroOLED库。字体加载到程序内存中(通过PROGMEM指令)。这会使代码在wemos上失败。我删除了这个库的一个分支上的PROGMEM指令(https://github.com/landru29/SparkFun_Micro_OLED_Arduino_Library)

我只是检查拱门是否为ARDUINO_ESP8266_NODEMCU https://github.com/landru29/SparkFun_Micro_OLED_Arduino_Library/blob/master/src/util/7segment.h#L37 (对于同一文件夹中的所有其他字体文件均为idem)

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36768562

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档