-
Notifications
You must be signed in to change notification settings - Fork 29
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
Comments
I will respond to you after testing on Monday |
Thank you Lewis.
I have tried everything and have been unsuccessful for weeks.
I am usually using Arduino IDE and I have all components of the board working (except the microphones): I2S sound out through speaker, TFT, SD card, rotary dial and button, leds all work perfectly, but I cant get the microphone to work.
When I use VS Code for the supplied Mic example I only get “0” on the serial monitor/ plotter.
I think the board is so great and I really would like to use the microphones, but can’t get it to work.
I would be most grateful for a working simple code snipplet just reading the es7210 microphones and outputting it on serial.
Thank you in advance.
Best,
Tom
From: Lewis He ***@***.***>
Date: Sunday, 9 April 2023 at 03:45
To: Xinyuan-LilyGO/T-Embed ***@***.***>
Cc: Tom ***@***.***>, Author ***@***.***>
Subject: Re: [Xinyuan-LilyGO/T-Embed] Unable to make microphones work - ES7210 (Issue #20)
I will respond to you after testing on Monday
—
Reply to this email directly, view it on GitHub<#20 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIBQBR6MDP6HHGQ2CMIX6FLXAIPD7ANCNFSM6AAAAAAWTVO6AU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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 |
Hi Lewis,
Thank you so much! It is working and I love that you use VAD.
Could I please ask you to extend the code so it records the audio/speech to a file on the SD card.
I am using this function to mount the SD card and would like to record speech to it when voice is detected (or the rotary button is pressed hold):
void SD_init() {
pinMode(PIN_SD_CS, OUTPUT);
digitalWrite(PIN_SD_CS, 1);
SD_MMC.setPins(PIN_SD_SCK, PIN_SD_MOSI, PIN_SD_MISO);
if (!SD_MMC.begin("/sdcard", true)) {
Serial.println("Card Mount Failed");
return;
}
uint8_t cardType = SD_MMC.cardType();
if (cardType == CARD_NONE) {
Serial.println("No SD card attached");
return;
}
delay(500);
}
Thank you in advance for your help. You are great!
Thank you.
Best,
Tom
From: Lewis He ***@***.***>
Date: Monday, 10 April 2023 at 02:20
To: Xinyuan-LilyGO/T-Embed ***@***.***>
Cc: Tom ***@***.***>, Author ***@***.***>
Subject: Re: [Xinyuan-LilyGO/T-Embed] Unable to make microphones work - ES7210 (Issue #20)
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
—
Reply to this email directly, view it on GitHub<#20 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIBQBRYUO7LSGDWZLSNFF2LXANN63ANCNFSM6AAAAAAWTVO6AU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Dear Lewis,
One more thing. Not sure why, but using your code somehow doesn’t let me use the rotary button anymore.
I used to access the button vie the OneButton library without any problems, but somehow this doesn’t work anymore using your code.
It seems PIN 0 (rotary button/boot button) can’t be used anymore. I did attach an external button to PIN 16 and OneButton library works with this one.
#include "OneButton.h"
#define ROTARY_BUTTON 0
OneButton button(ROTARY_BUTTON, true);
void setup() {
Serial.begin(115200);
button.attachClick(click1);
}
void loop() {
button.tick();
}
void click1()
{
Serial.println("Button pressed");
}
The above code doesn’t work anymore in combination with the MIC example you posted.
Could you please check why this is the case.
Thank you.
Best,
Tom
From: Tom Mueller ***@***.***>
Date: Tuesday, 11 April 2023 at 09:28
To: Xinyuan-LilyGO/T-Embed ***@***.***>, Xinyuan-LilyGO/T-Embed ***@***.***>
Cc: Author ***@***.***>
Subject: Re: [Xinyuan-LilyGO/T-Embed] Unable to make microphones work - ES7210 (Issue #20)
Hi Lewis,
Thank you so much! It is working and I love that you use VAD.
Could I please ask you to extend the code so it records the audio/speech to a file on the SD card.
I am using this function to mount the SD card and would like to record speech to it when voice is detected (or the rotary button is pressed hold):
void SD_init() {
pinMode(PIN_SD_CS, OUTPUT);
digitalWrite(PIN_SD_CS, 1);
SD_MMC.setPins(PIN_SD_SCK, PIN_SD_MOSI, PIN_SD_MISO);
if (!SD_MMC.begin("/sdcard", true)) {
Serial.println("Card Mount Failed");
return;
}
uint8_t cardType = SD_MMC.cardType();
if (cardType == CARD_NONE) {
Serial.println("No SD card attached");
return;
}
delay(500);
}
Thank you in advance for your help. You are great!
Thank you.
Best,
Tom
From: Lewis He ***@***.***>
Date: Monday, 10 April 2023 at 02:20
To: Xinyuan-LilyGO/T-Embed ***@***.***>
Cc: Tom ***@***.***>, Author ***@***.***>
Subject: Re: [Xinyuan-LilyGO/T-Embed] Unable to make microphones work - ES7210 (Issue #20)
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
—
Reply to this email directly, view it on GitHub<#20 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIBQBRYUO7LSGDWZLSNFF2LXANN63ANCNFSM6AAAAAAWTVO6AU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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. |
Hi Tom, |
Hi Jean Paul,
Great to hear from you.
Yes, I did get it to work (a little bit).
Couple of things:
* You can’t use the rotary button anymore, it is no longer available after activating the mic. I attached an external pushbutton.
* I2S_CH needs to be on I2S_NUM_1. Channel 0 doesn’t work.
* Also PDM doesn’t work
* When I do record audio/speech to the SD card the wav file plays back very distorted/ slowely. I cant figure out why and would love Lewis to provide some more guidance. I played around with buffer size, etc. but can’t figure it out yet.
Have a look at my clumpsy github: https://github.com/tfkmuller/t-embed-chatbot
Best,
Tom
From: jalmince ***@***.***>
Date: Saturday, 15 April 2023 at 20:36
To: Xinyuan-LilyGO/T-Embed ***@***.***>
Cc: Tom ***@***.***>, Author ***@***.***>
Subject: Re: [Xinyuan-LilyGO/T-Embed] Unable to make microphones work - ES7210 (Issue #20)
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
—
Reply to this email directly, view it on GitHub<#20 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIBQBR3NS7ITOMV3KQUOVKDXBL2DFANCNFSM6AAAAAAWTVO6AU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi Tom ! 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 |
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
The text was updated successfully, but these errors were encountered: