I2S and I2C On Pro What addresses/Pins

Discussion in 'UDOO KEY' started by digiital, Feb 24, 2023.

  1. digiital

    digiital New Member

    Joined:
    Feb 24, 2023
    Messages:
    2
    Likes Received:
    1
    The lack of documentation on the sensors is pretty disappointing.

    I think I found the i2c address for the "IMU motion sensor" . I thought there was a temperature sensor for the esp32 but seems like it's only the pi builtin.

    For the Microphone, what pins is it connected to on the esp32, I'm assuming it's not connected to the pi at all even with the jumpers.

    I'm doing a WHOLE LOT OF Googling to try and figure out the details and trying this and that. When the details should be clearly put in the docs for the KEY.
     
    Opi-Van-Kristovi likes this.
  2. JMuller

    JMuller UDOOer

    Joined:
    Feb 15, 2023
    Messages:
    5
    Likes Received:
    2
  3. JMuller

    JMuller UDOOer

    Joined:
    Feb 15, 2023
    Messages:
    5
    Likes Received:
    2
    Sorry for my error in the I2S DO IO port. It is IO 25 NOT IO 21. My bad!
     
  4. Lhimo

    Lhimo New Member

    Joined:
    Apr 12, 2023
    Messages:
    3
    Likes Received:
    0
    This ESPHOME config might work:
    Code:
    i2s_audio:
      i2s_lrclk_pin: GPIO27
    
    microphone:
      - platform: i2s_audio
        id: external_mic
        adc_type: external
        i2s_din_pin: GPIO25
        pdm: true
        on_data:
          - logger.log:
              format: "Received %d bytes"
              args: ['x.size()']
    
    switch:
      - platform: template
        name: Use wake word
        id: use_wake_word
        optimistic: true
        restore_mode: RESTORE_DEFAULT_ON
        entity_category: config
        on_turn_on:
          - lambda: id(assist).set_use_wake_word(true);
          - if:
              condition:
                not:
                  - voice_assistant.is_running
              then:
                - voice_assistant.start_continuous
        on_turn_off:
          - voice_assistant.stop
          - lambda: id(assist).set_use_wake_word(false);
    
    voice_assistant:
      microphone: external_mic
      use_wake_word: true
      noise_suppression_level: 2
      auto_gain: 31dBFS
      volume_multiplier: 2.0
      on_stt_end:
        then:
          - logger.log: x
      id: assist
     
  5. Lhimo

    Lhimo New Member

    Joined:
    Apr 12, 2023
    Messages:
    3
    Likes Received:
    0
    This is for MPU instead:
    Code:
    i2c:
      sda: 18
      scl: 21
      scan: true
      id: bus_a
    
    sensor:
      - platform: mpu6050
        address: 0x69
        accel_x:
          name: "MPU6050 Accel X"
        accel_y:
          name: "MPU6050 Accel Y"
        accel_z:
          name: "MPU6050 Accel z"
        gyro_x:
          name: "MPU6050 Gyro X"
        gyro_y:
          name: "MPU6050 Gyro Y"
        gyro_z:
          name: "MPU6050 Gyro z"
        temperature:
          name: "MPU6050 Temperature"
        update_interval: 1s
    
     

Share This Page