We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are very few examples to show how to pull mic samples with the M5AtomS3U. All my attempts have failed.
Here is some example code that I think should work. It does get samples but all of these are invalid.
do { i2s_chan_config_t rx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER); if (i2s_new_channel(&rx_chan_cfg, NULL, &rx_chan) != ESP_OK) { Debug::Log.error(LOG_MIC, "i2s_new_channel error"); break; } i2s_pdm_rx_config_t pdm_rx_cfg = { .clk_cfg = I2S_PDM_RX_CLK_DEFAULT_CONFIG(SAMPLE_RATE), /* The data bit-width of PDM mode is fixed to 16 */ .slot_cfg = I2S_PDM_RX_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO), .gpio_cfg = { .clk = (gpio_num_t)I2S_SPM1423_CLK, .din = (gpio_num_t)I2S_SPM1423_DATA, .invert_flags = { .clk_inv = false, }, }, }; pdm_rx_cfg.slot_cfg.slot_mask = I2S_PDM_SLOT_RIGHT; if (i2s_channel_init_pdm_rx_mode(rx_chan, &pdm_rx_cfg) != ESP_OK) { break; } /* Step 3: Enable the rx channels before reading data */ if (i2s_channel_enable(rx_chan) != ESP_OK) { break; } size_t bytes_read = 0; if (i2s_channel_read(rx_chan, (microphonedata0 + data_offset), DATA_SIZE, &bytes_read, 1000) == ESP_OK && bytes_read != 0) { data_offset += bytes_read; // write to serial for debug } } while (false);
A working example and some valid samples
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
There are very few examples to show how to pull mic samples with the M5AtomS3U. All my attempts have failed.
To reproduce
Here is some example code that I think should work. It does get samples but all of these are invalid.
Expected behavior
A working example and some valid samples
Screenshots
No response
Environment
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: