Notifications
Clear all

Using a microphone and a speaker on a esp32

8 Posts
3 Users
0 Likes
752 Views
(@psychique)
Member
Joined: 9 months ago
Posts: 1
Topic starter  

Hello i was wondering if someone could help me use a microphone on a esp32 and redirect the sound in a headset via the esp32. Some help would be much appreciated thanks.

I have already been able to use both of them separately by using the code and the explanations on dronebot's workshop website ( https://dronebotworkshop.com/esp32-i2s/ ), but i think that the libraries that are used won't let me make them work together. I started researching if there was anything on the net about it but i couldn't find anything. Also i am using vs code with platformIO. Also i won't be able to add a SD card because won't work with it.

We are also planning on using a potentiometer to make the volume go up or down.


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6495
 

@psychique Which libraries are you using, which do you think are in conflict? If the examples you are copying produce output to a speaker, then just replace the speaker with the headset. You might need to adjust some R in the circuit but it should work.

Who is we inΒ 

We are also planning on using a potentiometer to make the volume go up or down.

Β 

Β 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@hzulu)
Member
Joined: 9 months ago
Posts: 16
 

@psychique The "swiss army knife" ( swiss is meant literally in this case πŸ˜‰ ) for everything concerning I2S streaming, you'll find on
https://github.com/pschatzmann/ESP32-A2DP
I'm quite sure all your questions will be answered there.

There is also an explanation how to use those libraries with PlatformIO
https://github.com/pschatzmann/ESP32-A2DP/wiki/PlatformIO

Rule of Thumb in hardware/software engineering:
From the estimated time to complete a project you need:
5% for the engineering itself
95% securing everything against any strange idea users can have
and the remaining
150% for finding and fixing bugs that you thought never could happen


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6495
 

@hzulu What a coincidence, two new users being helped by the same library in the last couple of days.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@hzulu)
Member
Joined: 9 months ago
Posts: 16
 

@zander Yes! what a coincidence... For the preparation of my own project's specification (details will come when I'm ready) I've studied all ESP32 I2S information I could get hold of. Phil Schatzmanns libraries are a piece of art.

Rule of Thumb in hardware/software engineering:
From the estimated time to complete a project you need:
5% for the engineering itself
95% securing everything against any strange idea users can have
and the remaining
150% for finding and fixing bugs that you thought never could happen


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6495
 

@hzulu Agreed, I also have I2S etc. and especially Phil's libraries on my waaaaay too long to-do list. Being 81 with 2 or 3 failing body sub-systems and the fast-failing Canadian health system, I fear I will run out of time before I make any appreciable dent in my list, but I will try!

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@hzulu)
Member
Joined: 9 months ago
Posts: 16
 

@zander Wow!! I'm really impressed! According the huge amount of your contributions to this forum, I didn't expect you 81

Rule of Thumb in hardware/software engineering:
From the estimated time to complete a project you need:
5% for the engineering itself
95% securing everything against any strange idea users can have
and the remaining
150% for finding and fixing bugs that you thought never could happen


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6495
 

@hzulu I have slowed down a bit and have no training in anything after vacuum tubes. I have learned a teeny bit with the help of others here. However, basic troubleshooting techniques are the same as they always have been. Swap parts and observe which way the bug moves. Divide the project up into smaller parts and test each until one part shows a bug, then divide that one. Easy to do with software, a bit of trouble with hardware but technique #1 is the reverse, so it's all good with just those two time-proven approaches.Β 

My first computer was in 1959. My High School received an analogue computer from Ferranti Packard Canada. It couldn't do much more than move a needle on an analogue gauge, but it was a start.

Β 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote