SSD1306 i2c static or snowy display

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
willnyulak@gmail.com
Posts: 3
Joined: Mon Jan 03, 2022 7:22 pm

SSD1306 i2c static or snowy display

Post by willnyulak@gmail.com » Mon Jan 03, 2022 9:43 pm

Having issues with a snowy display on my ssd1306 128x64 breakout board

Version Info Micropython:
(sysname='esp32', nodename='esp32', release='1.17.0', version='v1.17 on 2021-09-02', machine='ESP32 module with ESP32')

1. Firstly, when I tried to install the "micropython-ssd1306" (v 0.3 latest stable version) from the plug-in manager in Thonny v3.3.13 I got the following error from PyPi:
__________________________________________________________________
C:\Users\Administrator\AppData\Local\Programs\Thonny\python.exe -m pip install --no-cache-dir --user micropython-ssd1306 --disable-pip-version-check
Collecting micropython-ssd1306
Downloading micropython-ssd1306-0.3.tar.gz (1.8 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Administrator\AppData\Local\Programs\Thonny\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-enq4jmx2\\micropython-ssd1306\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-enq4jmx2\\micropython-ssd1306\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-pip-egg-info-ddbafrtc'
cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-enq4jmx2\micropython-ssd1306\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Administrator\AppData\Local\Programs\Thonny\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-enq4jmx2\\micropython-ssd1306\\setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Error: process returned with code 1
__________________________________________________________________

I am not sure what's going on there but I do have issues using PIP at the command prompt and have attempted to solve that by fixing path problems, but to no avail.

I am thinking this is the most viable version, and looks like Adafruit only supports Circuit Python now, but unable to find a repository I went out and tried random copy / paste sessions from online tutorials and saving ssd1306.py to the board, which led me to a version that at least would not cause Traceback errors.

2. Second issue was with i2c - I believe SoftI2C should be used now? I didn't capture the Traceback I was getting with I2C, but I get none with SoftI2C and can scan and find address 60 dec... so the comms seem good.

I read an obscure post about a reset pin needing to be triggered after power up some ssd1306 boards, but there is no exposed reset pin on my breakout board.

I have tried to use various combinations of other pins on the ESP32 to no avail, and again, whichever pins I use I can scan.

Not sure what to do now - Are pullup resistors required? Can anyone else think of what else I can check for?

willnyulak@gmail.com
Posts: 3
Joined: Mon Jan 03, 2022 7:22 pm

Re: SSD1306 i2c static or snowy display

Post by willnyulak@gmail.com » Wed Jan 05, 2022 8:52 pm

Nevermind!

…was using the wrong driver. Mine is an sh1106 display, not an ssd1306 :oops:

If anyone else runs into this the correct driver is located here:
https://github.com/robert-hh/SH1106

Post Reply