Coder Social home page Coder Social logo

claudemarais / audiorecording_esp32-c3 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 4 KB

An example of recording audio onto a MicroSD card, using an INMP441 microphone and a XIAO ESP32-C3

C++ 100.00%
arduino audio esp32 esp32-c3 i2s i2s-microphone inmp441 microphone microsd sound

audiorecording_esp32-c3's Introduction

AudioRecording_ESP32-C3

An example of recording audio onto a MicroSD card, using an INMP441 microphone and a XIAO ESP32-C3

Since the values for i2s.dma_buf_count and i2s.dma_buf_len can be somewhat of a mystery, in this example they are calculated automatically to use the least amount of DMA memory given your preference for latency and CPU interrupts.

With a low latency setup, the DMA will interrupt the CPU more frequently, but use less DMA memory. With a high latency setup, the DMA will interrupt the CPU less frequently, but use more DMA memory.

For example, this code includes test calculations in a fixed for-loop. With a very low latency setup, the loop takes 12225 ms to complete, compared to ony 12027 ms on a high latency setup. A very measurable difference.

See this excellent video: https://youtu.be/ejyt-kWmys8?si=oVVuLGKX63CKpm2t

Note, the I2S pins for the XIAO ESP32-C3 isn't well documented, had to find the info searching through forums

Specifically for XIAO ESP32-C3

DO = WS / LRC / LCK

D1 = SCK / BCLK / BCK

D2 = SD / DIN / DATA

audiorecording_esp32-c3's People

Contributors

claudemarais avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

nihalbaig0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.