Micropython Rapsberry Pico“没有名为 ffi 的模块”在 SSD1306 库上
我是新来的:) 我买了带液晶屏的 Rapsberry Pico,我想在这个显示器上显示一些东西,但是当我导入 ssd1306 lib Thonny 时,给我发了一个问题“没有名为 ffi 的模块”,我不知道如何导入这个库。 这是我的简单代码:
from machine import Pin, I2C
import ssd1306
i2c = I2C(scl=Pin(1), sda=Pin(0), freq=400000)
display = ssd1306.SSD1306_I2C(128, 64, i2c)
display.text("some text", 0, 0)
display.show()
我在 ofc 之前安装了 micropython-ssd1306 lib。
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "ssd1306.py", line 4, in <module>
File "/lib/framebuf.py", line 2, in <module>
File "/lib/usdl2.py", line 2, in <module>
ImportError: no module named 'ffi'
MicroPython v1.13-395-gcb04da56d 于 2021 年 1 月 12 日发布;带 RP2040 的树莓派 Pico
Im new here :)
I bought the Rapsberry Pico with the lcd screen, i want to display something on this display but when i import ssd1306 lib Thonny send me a problem "no module named ffi" i don't know how to import this lib.
Thats my simple code:
from machine import Pin, I2C
import ssd1306
i2c = I2C(scl=Pin(1), sda=Pin(0), freq=400000)
display = ssd1306.SSD1306_I2C(128, 64, i2c)
display.text("some text", 0, 0)
display.show()
I installed micropython-ssd1306 lib before ofc.
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "ssd1306.py", line 4, in <module>
File "/lib/framebuf.py", line 2, in <module>
File "/lib/usdl2.py", line 2, in <module>
ImportError: no module named 'ffi'
MicroPython v1.13-395-gcb04da56d on 2021-01-12; Raspberry Pi Pico with RP2040
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论