Closed perlix closed 2 years ago
Hmm - the pins are the same like 5) ai_thinker (ES8388) 3478. Did you try with that option ?
Thanks again for the ultrasonic response! You're right (of course), just tried option 5 and that works fine for my 2957, so please forget my first suggestion.
You'll probably come up with a better alternative for my second suggestion as well, but I was so pleased to have found it after days of tinkering that I wanted to share it, just in case...
Thanks for your flawless and well documented libraries!
I will update the Readme and add the 2957 to option 5 as well. For the issue with the volume I don't have an easy solution.
For the volume I added an additional option in the AudioKitSettings.h. Can you help me to test this:
Just installed the newest version and tested a clean _player-urlicy-audiokit example from the arduino-audio-tools library with these two lines added atop:
#define AUDIOKIT_BOARD 5
#define AI_THINKER_ES8388_VOLUME_HACK 1
To my surprise, max volume is very low again. It appears that the unmodified es8388_set_voice_volume() was compiled, despite the new #if AI_THINKER_ES8388_VOLUME_HACK
directive in es8388.c. Changing it to #ifdef AI_THINKER_ES8388_VOLUME_HACK
makes everything work perfectly (on my kit). Beats me, but I'm on highly unfamiliar ground here.
(Hope I'm not bothering you too much with my strange version of this kit).
I confirm adding this in the sketch is not good enough. You need to update the AudioKitSettings.h file
Moved #define AI_THINKER_ES8388_VOLUME_HACK 1
from the sketch to AudioKitSettings.h and everything now works like the Swiss public transport! As I said: unfamiliar ground for me, so thanks for your patience.
Cool
After I got my 'flavour' of the infamous Audiokit v2.2 (2957) with ES8388 to work, I have two suggestions that may shorten the route for other beginners:
Perhaps this version of the board could be added as something like '8) ai_thinker (ES8388) 2957 (I2C on 32/33)' to the AudioKitSettings.h file, and then made selectable via
#define AUDIOKIT_BOARD 8
, with the following pin definitions in its board_pins_config.c file:Unlike the 18/23 version, this board has no conflict with GPIO18, so volume control through KEY5 and KEY6 will work.
On this flavour of the v2.2 (ES8388) 2957 board, the current file es8388.c results in very low max volume on speakers as well as headphones. An elsewhere suggested fix that worked for me was changing function _es8388_get_voicevolume() in that file as follows:
So perhaps this board could have its own _es8388_set_voicevolume() function?