User Tools

Site Tools


esp32:i2s

MH-ET LIVE Omnidirectional Microphone Module I2S Interface INMP441 MEMS High Precision Low Power Ultra small volume for ESP32

esp32 i2s microphone

tik l/r ruti buti GRND

https://github.com/maspetsberger/esp32-i2s-mems

veikia man ir 16 ir 32 bitai: I2S_BITS_PER_SAMPLE_16BIT I2S_BITS_PER_SAMPLE_32BIT

sample_rate maziausias 4000, didziausias 48000

ne sitas SPH0645 I2S MEMS Microphone

SEL is unconnected, i.e. only one channel, apparently left

  if (bytes_read > 0 and sample != 0) {
  

  // The I2S config as per the example
  const i2s_config_t i2s_config = {
    .mode = i2s_mode_t(I2S_MODE_MASTER | I2S_MODE_RX), // Receive, not transfer
    //.mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_TX | I2S_MODE_DAC_BUILT_IN | I2S_MODE_ADC_BUILT_IN),
    .sample_rate =   SAMPLE_RATE, // 48000,   44100, //                      // 16KHz
    .bits_per_sample = I2S_BITS_PER_SAMPLE_32BIT, // could only get it to work with 32bits
    .channel_format = I2S_CHANNEL_FMT_ONLY_LEFT, // although the SEL config should be left, it seems to transmit on right
    //.channel_format = I2S_CHANNEL_FMT_ONLY_RIGHT, 
    //.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
    .communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB),
    //.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,     // Interrupt level 1
    //      .dma_buf_count = 16,                           // number of buffers
    //      .dma_buf_len = 80                              // 8 samples per buffer (minimum)

    .intr_alloc_flags = 0,
    //.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1,     // Interrupt level 1
    .dma_buf_count = 16,
    .dma_buf_len = 1024
  };

ir L/R turi buti pajungtas ant grnd

esp32/i2s.txt · Last modified: by aistis