|
ESP32-WROOM-32D(16MB)ESPRESSIF(乐鑫)
|
x 1 | |
|
1987737Phoenix Contact
|
x 3 | |
|
422001 BK005Alpha Wire
|
x 5 | |
|
CLS0201MPCUI Devices
|
x 1 | |
|
TIP120TUonsemi
|
x 1 |
|
arduino IDEArduino
|
ESP8266 Audio | Play Audio File With Esp8266 or Nodemcu Without SD CARD
Hi Guys, Today in this tutorial we will store a audio file in our ESP / Nodemcu board and we will play it without any external I2S DAC.
we will encode our audio into hex format and then we will store the audio in our ESP8266 / Nodemcu and then we will play it from ESPs internal memory using a speaker.
so without wasting anymore time let's start:-
For this project you need following things :
Nodemcu/ESP8266/ESP32
TIP120 or any NPN Transistor
1/2/3 W Speaker
Jumper wires & Breadboard
you can find the attached schmatics of the project and please connect everything according to shown schamtics.
so before we proceed make sure you have arduino IDE installled in your PC and you also have installed the ESP boards in the IDE.
Then open the IDE and go to library manager in your IDE and search for "esp8266 audio" and install that library in IDE, then go to the examples of ;library and open "PlayWaveFromPROGRAMEM" and upload it to your board and the speaker attached to board will play the default audio file which is encoded in Viola.h. so we need to encode our audio and put our audio in viola.h and we are done. so let's prepare audio.
so as you can see i recorded a audio and converted it to a 32KHZ audio and saved it as 16 Bit PCM. and file size was 500KB near about (8 sec long) , based on that if you want a long duration audio file go for a lower project rate (from 8 KHZ - 40 KHZ ) so choose either quality or quantity but try to make a file near about 500KB or less.
Then go to a online file to hexadecimal converter :
http://tomeko.net/online_tools/file_to_hex.php?lang=en
and choose your file and it will give you hex codes for your audio and just copy the hex code.
and we successfully encoded our audio into hex, now we just need to paste it into the code.
just come to code again and in Viola.h file just remove all the hex codes and paste our hex codes which we got from online file to hexadecimal converter as shown in images.
Then after that just upload the code to your board and you will able to hear the audio you recorded and encoded.
Please refer the attached video for demo and detailed tutorial.
Thanks|||
Have fun with your ESP based audio device. |||
ESP8266 Audio | Play Audio File With Esp8266 or Nodemcu Without SD CARD
- Comments(4)
- Likes(2)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by electronicguru0007
- How to make an alarm clock with pic microcontroller he five push buttons will act as an input for setting the alarm for the required time. So one end of...
- How to make RMS to DC Converter using IC AD736 A True-RMS or TRMS is a type of converter which converts RMS value to equivalent DC value. Here in t...
- STM32 SPI Communcation and Data Sent SPI in STM32F103C8Comparing SPI bus in Arduino & STM32F103C8 Blue Pill board, STM32 has 2 SPI bu...
- How to Communicate Arduinos via RS-485 What project will you develop?The project consists of 3 Arduino's. We have an Arduino UNO, a Nano, a...
- PIC16F877A Temperature and Humidity Measurement Board Temperature and Humidity measurement is often useful in many applications like Home Automation, Envi...
- Diy Buck Converter n the field of DC-DC Converters, A single-ended primary-inductor converter or SEPIC converter is a t...
- Iot AC Current Measuring System Smart power monitoring is getting increasingly popular to improve energy efficiency in medium/small ...
- ESP32 Weather Station In this project, we will learn how to create a weather station, which will display reading from a BM...
- NRF Data Transfer Via 2 Boards There are various wireless communication technologies used in building IoT applications and RF (Radi...
- Iot patient monitoring system When we are talking about major vital signs of a human body, there are four major parameters that we...
- Setting up zigbee communication with nodemcu and arduino Zigbee is a popular wireless communication protocol used to transfer a small amount of data with ver...
- Ac Dimmer Remote PCB The brightness can be controlled using the IR remote of TV, DVD, etc. Dimming Control system using M...
- Esp32 Home Automation There are relay modules whose electromagnet can be powered by 5V and with 3.3V. Both can be used wit...
- Lora Communication With Network This was a very simple project and can come in handy for various applications. But what it can't do ...
- GPS Module Based Tracking Device Pcb ESP32 GPS vehicle tracker using NEO 6M GPS module and Arduino IDE. With the help of this GPS tracker...
- Traffic Management for Emergency Vehicles using AT89S52 Microcontroller These days’ traffic congestion is the biggest problem of densely populated cities. The project focus...
- Diy Multimeter Pcb This is a project based on Arduino board which can measureresistance, diode, continuity[H1] , voltag...
- Live Instagram Followers Pcb ESP8266 is capable of functioning reliably in industrial environments, with an operating temperature...
-
Open Source Very Large Stick - Freejoy & MMjoy2 breakout board
359 0 0 -
RF Control training board for students based on ESP32 C3
473 0 2 -
Aquarius+ Computer, Standard PCB
670 0 3 -
KINETIC COASTERS with a TWIST! Laser or 3D Print some DIY Magic
486 0 1 -
RPI - 8 IO PLC With ATTiny85 Watch Dog
424 0 0 -
Nintendo Famicom HVC-001 Controller Shells
524 0 1 -
COMMODORE 128 DIAGNOSTIC REV.785260 KEYBOARD DONGLE
501 0 4 -
COMMODORE 128 15KHz DISPLAY ADAPTER (C128 80 COLUMN ADAPTER)
640 1 4 -