Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

QT PY + SSD1306 + vl53l0x Memory Error
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

QT PY + SSD1306 + vl53l0x Memory Error

by dlongley on Sun Oct 11, 2020 3:26 pm

Hi All,

I am trying to use the adafruit_ssd1306 and adafruit_vl53l0x libraries on a QT PY flashed with Version 6 Beta 2, and am receiving the dreaded MemoryError. I have tried importing gc/gc.collect after each import, but no luck. Are the libraries just too large for the QT PY? Any work arounds?

My code:

import gc
import board
gc.collect()
import busio
gc.collect()
import adafruit_vl53l0x
gc.collect()
import adafruit_ssd1306
gc.collect()


Regards,
David

dlongley
 
Posts: 20
Joined: Sat Jul 04, 2015 4:58 pm

Re: QT PY + SSD1306 + vl53l0x Memory Error

by dastels on Sun Oct 11, 2020 5:59 pm

In my experience the ssd1306 CircuitPython module has always been a memory issue on the SAMD21 boards.

Dave

dastels
 
Posts: 3767
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT PY + SSD1306 + vl53l0x Memory Error

by tannewt on Mon Oct 12, 2020 5:52 pm

Hi David, I think you'll need to strip code out of the libraries to get them to fit.

Note, we automatically do a gc.collect after each import so you don't need to.

tannewt
 
Posts: 1837
Joined: Thu Oct 06, 2016 8:48 pm

Re: QT PY + SSD1306 + vl53l0x Memory Error

by dlongley on Mon Oct 12, 2020 6:08 pm

Thanks, I might give that a go.
If all else fails, I will go with a beefier board.

dlongley
 
Posts: 20
Joined: Sat Jul 04, 2015 4:58 pm

Please be positive and constructive with your questions and comments.