我们一直致力于一个项目,使电子纸显示与树莓派Pico板的工作。我们已经设法用ESP8266-board让一切正常工作,但出于耗电的原因,我们想使用Pico。我们使用的电子纸显示器是Waveshare 2.9“SPI。
我们正在尝试使用这个库:https://github.com/ZinggJM/GxEPD2
它在ESP8266上工作得很好,有没有人设法让它和Raspberry Pi Pico一起工作,如果是这样的话,你能提供一些技巧让它和Pico一起工作吗?请查看附件中我们收到的错误信息。

这是我收到的错误消息:
Arduino: 1.8.13 (Windows 10), Board: "Raspberry Pi Pico, Serial, None"
C:\Users\ \Documents\Arduino\libraries\GxEPD2\src\GxEPD2_EPD.cpp:17:10: fatal error: pgmspace.h: No such file or directory
17 | #include <pgmspace.h>
| ^~~~~~~~~~~~
compilation terminated.
exit status 1
Error compiling for board Raspberry Pi Pico.来自此文件GxEPD2_EPD.cpp:17:10的以下代码行:
14 #if defined(ESP8266) || defined(ESP32)
15 #include <pgmspace.h>
16 #else
17 #include <avr/pgmspace.h>
18 #endif发布于 2021-03-26 21:42:21
它找不到的头文件是pgmspace.h,它支持在基于AVR的arduinos (使用哈佛内存模型)上访问程序内存。这对于大多数基于32位的CPU来说不是必需的,因为它们具有扁平的von-Neumann内存模型。许多其他32位电路板(例如Arduino Due或ESP32的电路板)都包含一个虚拟的头文件,以模拟AVR行为。由于这些只是替换宏,因此您可以使用Arduino Due的实现(在概念上与Raspberry Pico非常接近)。它的定义是here。
https://stackoverflow.com/questions/66814408
复制相似问题