Closed kevinjwalters closed 2 years ago
Confirmed: Circuit Playground Express can now freeze/hang after using mic.record
using: adafruit-circuitpython-circuitplayground_express-en_US-6.2.0.uf2
Also CircuitPlaygroundExpress_SoundMeter.py apparently no longer works for me now because only 32 samples are returned by mic.record() instead of the expected 160 (as explained in bug #4261), even then, after fixing that code for count, it's prone to freeze/hang later with more code, for example, adding this at the end now crashes the CPX when switch is moved to False (doesn't with 5.x):
if not switch.value: # setup earlier as DigitalInOut(board.D7) with Direction.INPUT Pull.UP
import supervisor
supervisor.reload() # attempting to reload main.py
Power cycle or CPX reset button appear to be only way back.
This should be fixed by #5842.
I just noticed this on
6.2.0
on a CPX with fresh (20210413
) libraries,mic.record()
hangs in a reproducible way under some circumstances. I tried a few things based on my first discovery of this. It looks like playing a wav file to the speaker does it.I see another issue with
record()
reported in #4261