User Tools

Site Tools


esp32:i2s

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
esp32:i2s [2019/10/11 14:30] – aistisesp32:i2s [2020/09/30 07:16] (current) – aistis
Line 3: Line 3:
 esp32 i2s microphone  esp32 i2s microphone 
  
-tik l/r ruti buti high+tik l/r ruti buti GRND
 {{:esp32:pasted:20191011-141845.png}} {{:esp32:pasted:20191011-141845.png}}
  
 {{:esp32:pasted:20191011-141830.png}} {{:esp32:pasted:20191011-141830.png}}
 +
 +{{:esp32:pasted:20191011-143741.png}}
  
 https://github.com/maspetsberger/esp32-i2s-mems https://github.com/maspetsberger/esp32-i2s-mems
  
 veikia man ir 16 ir 32 bitai: I2S_BITS_PER_SAMPLE_16BIT I2S_BITS_PER_SAMPLE_32BIT 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 ne sitas SPH0645 I2S MEMS Microphone
 +
 +
 +SEL is unconnected, i.e. only one channel, apparently left
 +
 +    if (bytes_read > 0 and sample != 0) {
 +    
 +{{:esp32:pasted:20200512-194536.png}}
 +
 +
 +
 +<code>
 +  // 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
 +  };
 +
 +</code>
 +
 +ir L/R turi buti pajungtas ant grnd
 +
 +
 +{{:esp32:pasted:20200513-210400.png}}
esp32/i2s.1570793459.txt.gz · Last modified: by aistis