Closed songshuailin closed 2 years ago
You are using the https://github.com/adafruit/Adafruit_Python_SSD1306 library. That library is deprecated and no longer supported. Try using the https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 library, which uses adafruit-blinka
to allow CIrcuitPython code to run on your platform (if it is supported).
Traceback (most recent call last): File "oled.py", line 16, in
disp = Adafruit_SSD1306.SSD1306_128_32(rst=RST)
File "/usr/local/lib/python3.8/dist-packages/Adafruit_SSD1306/SSD1306.py", line 287, in init
super(SSD1306_128_32, self).init(128, 32, rst, dc, sclk, din, cs,
File "/usr/local/lib/python3.8/dist-packages/Adafruit_SSD1306/SSD1306.py", line 85, in init
self._gpio = GPIO.get_platform_gpio()
File "/usr/local/lib/python3.8/dist-packages/Adafruit_GPIO/GPIO.py", line 426, in get_platform_gpio
raise RuntimeError('Could not determine platform.')
RuntimeError: Could not determine platform.