adafruit / Adafruit_CircuitPython_EMC2101

CircuitPython driver for EMC2101 brushless fan controller
MIT License
3 stars 9 forks source link

Memory error using sample on QT Py #2

Closed rpavlik closed 3 years ago

rpavlik commented 3 years ago

Is there any way that I could slim this library down a bit in terms of runtime memory usage? The code looks pretty complete - anything I can just drop out for testing? I am already using mpy versions of everything (installed via circup), on circuitpython 6.1.0 "haxpress" build (I have the spi flash)

ladyada commented 3 years ago

you could pull out all the LUT handling stuff,

rpavlik commented 3 years ago

Oh nifty, I was able to get it to work by commenting out the LUT and the PWM stuff, which still left enough functionality for the example to work (and everything I cared about). Here's the source and mpy. I'll have to look and see sometime if there's an easy-enough way to split this library a little bit so that you get this cut-down version by default, but if you have the RAM you get it all. Adafruit_CircuitPython_EMC2101.zip

(EDIT: Hmm, but there's less free memory on the Haxpress build. Interesting though not surprising.)

caternuson commented 3 years ago

Fixed with #6