Skip to content

v9.2.2 thru v9.2.4 slows to a crawl on ESP32-S2 when both ssd1306 OLED display and AHT20 sensor on the Stemma I2C bus at the same time #10022

Open
@Timeline8

Description

CircuitPython version and board name

v9.2.2 thru v9.2.4
Adafruit QT Py ESP32-S2 WiFi Dev Board with STEMMA QT Product ID: 5325

Code/REPL

import time
import board
import displayio
import i2cdisplaybus
import adafruit_displayio_ssd1306  # OLED
import adafruit_ahtx0  # WeAct T&H Sensor
import adafruit_sht4x  # Adafruit sensor

time.sleep(2)  # give me time to open serial window after power

# set up I2C with OLED display & AHT20 sensor
i2c = board.STEMMA_I2C()
displayio.release_displays()
display_bus = i2cdisplaybus.I2CDisplayBus(i2c, device_address=0x3C)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64)
ali_sensor = adafruit_ahtx0.AHTx0(i2c)  # WeAct AHT20-F Sensor
ada_sensor = adafruit_sht4x.SHT4x(i2c)  # Adafruit 5776 Sensor

for i in range(5):
    print("Loop ", i)
    time.sleep(0.3)

displayio.release_displays()

Behavior

Full description on my post to the Adafruit forums here: https://forums.adafruit.com/viewtopic.php?p=1044638

When both the OLED and the AHT20 are both initialized my code then crawls along very slowly. This does not happen pre-9.2.2.

Description

If I only initialize one or the other (OLED or AHT20) it works fine. I then added a SHT41 sensor to see if it is simply any two devices on the bus. But only the OLED+AHT20 combination slowed down. Any one device individually worked normal speed. OLED+SHT41 worked normal speed. And AHT20+SHT41 worked normal speed. Note in my code, I didn't even need to read from either. I simply printed text to the REPL to see the slow down. Note: for the display I commented out all three display setup lines. I didn't try individual lines.

This does not happen pre-9.2.2 so when I loaded in 9.2.1 it worked normal speed. Switching to 9.2.2 I get the slow down. Switching back to 9.2.1 normal speed again. When I first discovered this yesterday with a larger program it ran normal on 9.1.3, 9.2.0 & 9.2.1 but 9.2.2, 9.2.3, & 9.2.4 all has the slow down issue.

Appears to be limited to the S2. I then tried this with a Qt Py S3 and had no issues with any combination running CP v9.2.4

Additional information

settings.toml file was renamed so there was no connection to Wifi for this testing.

Testing set up was Qt Py S2 Stemma to Adafruit Stemma 5-port passive hub (Product ID: 5625) with Adafruit SHT41 sensor and WeAct Studio AHT20 sensor both plugged into the bug. OLED plugged into protoboard with Stemma to "Dupont" wires to also connector to hub.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions