Giter VIP home page Giter VIP logo

esp32_sdcard_audio's Introduction

Arduino Build IDF Build

ESP32 SDCard Wave File Example

This code shows how to record a WAV file to an SD Card attached to an ESP32 and then play it back.

There's an explanatory video here

Demo Video

There are two projects - one using Arduino and one using the Esspresif IDF. Both of these projects use PlatformIO to build.

Edit config.h for your device. In particular, you will probably want to change the button that is used to trigger recording and playback.

// record button
#define GPIO_BUTTON GPIO_NUM_23

Do I need Pull-Up resistors

A few people have reported that they have only been able to get this to work by adding pull up resistors.

This is recommended by Espressif under some circumstances

So if you are having issues with your SD Card not initialising then I'd suggest trying to add 10K pull resistors to the lines to see if that fixes your issues.

Wiring

Wiring up should be reasonably straightforward. The pins on an SD Card are as follows:

SD Card Pins

Make sure you update the config.h file with the GPIO pins you have used for your SD Card. Double-check that you have NOT re-used one of the pins that has been setup for the speaker or microphone.

Usage

To record audio press and hold the button. Recording will stop when you release the button.

The SD Card should contain a file called test.wav after a successful recording.

To playback the recording push the button.

Once the playback has finished the device will switch back to waiting for a new recording to be made.

Arduino

The arduino-wav-sdcard folder has code that works on the current release of Arduino for the ESP32.

IDF

The idf-wav-sdcard folder has code that works with the latest IDF release.

esp32_sdcard_audio's People

Contributors

cgreening avatar fionnoch avatar that-one-arab avatar

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.