Skip to main content
All CollectionsFeatures
Detect Audio through the Microphone with the STM32U5 Board
Detect Audio through the Microphone with the STM32U5 Board
avhsupport avatar
Written by avhsupport
Updated over 2 years ago

Table of Contents

AVH includes support for connecting your computer's microphone to virtual devices.

This article will demonstrate how to detect audio using the virtual STM32U5 board.


Build the ADF_AudioSoundDetector Firmware File

Follow this process to build the required .elf custom firmware files using the free STM32CubeIDE tool from STMicroelectronics.

  1. Install the STM32CubeIDE tool. In our example, we will use the MacOS version.

  2. On the top menu, click Help then Check for Target Selector Device Database Updates.

  3. On the popup window click REFRESH. Your project files will update.

  4. Create a new project by clicking New then STM32 Project from the File menu.

  5. Click on Example Selector.

  6. Set the Name to ADF_AudioSoundDetector, click on the ADF_AudioSoundDetector example to the right, and click Next.

  7. Click Finish to create the project.

  8. In the Project Explorer window, right-click on the ADF_AudioSoundDetector project and choose Build Project.

  9. The default path for your firmware file is ~/STM32CubeIDE/workspace_1.0.1/ADF_AudioSoundDetector/STM32CubeIDE/Debug/ADF_AudioSoundDetector.elf.

    ls ~/STM32CubeIDE/workspace_1.10.1/ADF_AudioSoundDetector/STM32CubeIDE/Debug/*.elf

  10. Proceed to the next section to boot the custom firmware file.


โ€‹


Boot the Custom Firmware and Detect Audio

  1. Log in to the AVH platform and click CREATE DEVICE.

  2. Select the STM32U5 device and click NEXT.

  3. Upload your ADF_AudioSoundDetector.elf custom firmware file click NEXT, then choose CREATE DEVICE.

  4. After your device boots, open the Sensors tab and enable the microphone.

  5. Confirm on your browser that you would like to share the microphone.

  6. The device should begin automatically detecting sound. You will see LED #2 lighting green to indicate audio is detected.

Did this answer your question?