Best way to stop and restart reading I2S from microphone #1827
-
I am using an SPH0645 microphone (Adafruit Breakout) and a XIAO ESP32S6. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think you mean I2S and not I2C. Calling end() is shutting down the I2S all together and calling begin() will restart it with the last defined settings (or default values when nothing has been defined before). Alternatively you can start the system from processing any data by just stop calling copy(), or you could call end() on the StreamCopy copier which has the same effect. In this case I2S will still be active and will consume some power, but it will be quicker to stop and resume the processing. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! I will use the end() and begin() and see how that goes. |
Beta Was this translation helpful? Give feedback.
I think you mean I2S and not I2C. Calling end() is shutting down the I2S all together and calling begin() will restart it with the last defined settings (or default values when nothing has been defined before).
Alternatively you can start the system from processing any data by just stop calling copy(), or you could call end() on the StreamCopy copier which has the same effect. In this case I2S will still be active and will consume some power, but it will be quicker to stop and resume the processing.