miketeachman / micropython-esp32-i2s-examples

Usage and examples for I2S support on the ESP32 microcontroller
MIT License
156 stars 29 forks source link

"ValueError: I2S port is already in use" #12

Closed mdaeron closed 4 years ago

mdaeron commented 4 years ago

If for some reason my code exits without calling I2S.deinit(), after I soft-reboot the board (crtl-D in REPL) I get the following message:

ValueError: I2S port is already in use

Apart from a hard reboot (unplugging and replugging my USB cable), is there a more elegant way to deinit() I2S?

miketeachman commented 4 years ago

You could reset the ESP32 in the REPL. That might be a better method compared to unplugging/plugging the USB cable?

import machine
machine.reset()
miketeachman commented 4 years ago

Workaround provided.

miketeachman commented 3 years ago

The latest commit removes the need for a hard reset.