Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make microphones work - ES7210 #20

Open
tfkmuller opened this issue Apr 5, 2023 · 9 comments
Open

Unable to make microphones work - ES7210 #20

tfkmuller opened this issue Apr 5, 2023 · 9 comments

Comments

@tfkmuller
Copy link

Hallo,

I love the t-embed board and am able to use all the components successfully in my code. However I have been struggling for weeks to make the microphones work. Can you please provide a simple example just outputting the microphones data to a serial plotter/ console.
I am struggling to get the ES7210 properly initialized and using the MCKL in the I2S initialization.
Please help, I spent so much time on it and can't get it to work.
The included mic example only outputs "0".
Thank you.

Best,
Tom

@lewisxhe
Copy link
Contributor

lewisxhe commented Apr 9, 2023

I will respond to you after testing on Monday

@tfkmuller
Copy link
Author

tfkmuller commented Apr 9, 2023 via email

@lewisxhe
Copy link
Contributor

I have updated the microphone example, which can detect the presence of sound. It can verify whether the board is working properly

https://github.com/Xinyuan-LilyGO/T-Embed/tree/main/example/mic

@tfkmuller
Copy link
Author

tfkmuller commented Apr 11, 2023 via email

@tfkmuller
Copy link
Author

tfkmuller commented Apr 11, 2023 via email

@lewisxhe
Copy link
Contributor

When the microphone is enabled, GPIO0 will not be available. There is no way to solve this problem, and I can't find out why in the existing manual documents.
Regarding audio recording, you can refer to this repository
https://github.com/RafigRzayev/Audio_Recording_to_WAV/blob/main/pdm_mic/pdm_mic.ino

@jalmince
Copy link

Hi Tom,
I 'd love to know if you managed to record the mic on card ?!
I am struggling... no success.
I try the code code Lewis pointed you to, adapted the pins from the mic example in the git, but my
device crashes in I2S_Init() after i2s_set_pin(....) with "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled." followed by mem dumps ( useless for me..)
Ive spent all day on that (...) untill I decided to ask for help !
cheers, Jean-Paul

@tfkmuller
Copy link
Author

tfkmuller commented Apr 16, 2023 via email

@jalmince
Copy link

Hi Tom !
thnks for your answer.
Actually I had got it to work in the mean time !
( another long night ..)
For the last issue ( slow playing back), you have to multiply by 2 for the data_size used in the loop populating the wav file :
uint32_t data_size = 2 * SAMPLE_RATE * I2S_BITS_PER_SAMPLE_16BIT * duration / 8;
May be had you figured it out as well in the mean time ?!
best,
JPaul

PS: not quite sure the git is the right place to exchange ! and didn t get any email to warn me you had replied..( may be something I should set up ?) I d happilly carry on through any other media if you have any idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants