这里先说一下,上一篇发的降噪程序已经不行了,主要问题集中在pyaudio库的运行速度和数据处理上……
最近再弄树莓派pico,连接oled的时候遇到了大问题。
再thonny里面下载ssd1306包的时候,可能是库的问题,也可能是服务器的问题。总之就是不能下载。CSDN上面好多楼主都说了方法,但是都会报错。直到我看到了这篇文章。这里直接把流程说一下(驱动不是我的,但是感觉这个挺好用)
第一步:在thonny里面新建一个程序,把以下代码copy进去
# MicroPython SSD1306 OLED driver, I2C and SPI interfaces
from micropython import const
import framebuf
# register definitions
SET_CONTRAST = const(0x81)
SET_ENTIRE_ON = const(0xA4)
SET_NORM_INV = const(0xA6)
SET_DISP = const(0xAE)
SET_MEM_ADDR = const(0x20)
SET_COL_ADDR = const(0x21)
SET_PAGE_ADDR = const(0x22)
SET_DISP_START_LINE = const(0x40)
SET_SEG_REMAP = const(0xA0)
SET_MUX_RATIO = const(0xA8)
SET_COM_OUT_DIR = const(0xC0)
SET_DISP_OFFSET = const(0xD3)
SET_COM_PIN_CFG = const(0xDA)
SET_DISP_CLK_DIV = const(0xD5)
SET_PRECHARGE = const(0xD9)
SET_VCOM_DESEL = const(0xDB)
SET_CHARGE_PUMP = const(0x8D)
# Subclassing FrameBuffer provides support for graphics primitives
# http://docs.micropython.org/en/latest/pyboard/library/framebuf.html
class SSD1306(framebuf.FrameBuffer):
def __init__(self, width, height, external_vcc):
self.width = width
self.height = height
self.external_vcc =