Closed itarozzi closed 10 months ago
It seems that the I2C configuration is correct but not sure about the I2S configuration. Could you ensure that the correct pins are used? You could try to run the SAW test signal by defining: OUTPUT_SAW_TEST in config.h
I enabled SAW test signal and it works - very loud :)
Then I recompiled without it and reconnected MIDI and now the EPiano example works. The same with ml_synt_organ example. Really strange!
But the list of errors from wire .cpp still remain.
I will do more test tomorrow, but despite the errors it seems to work
Good to hear. Strange. Maybe some component was not initialized correctly. I don't know how to deal with the errors from wire. It may be possible that an end call is missing!?
Thank you very much for your feedback
Can you address me to the file where the es8388 in the esp32 audiokit Is initialized? I can do some debug here.
Thanks again
Il sab 5 ago 2023, 10:01 Marcel @.***> ha scritto:
Good to hear. Strange. Maybe some component was not initialized correctly. I don't know how to deal with the errors from wire. It may be possible that an end call is missing!?
Thank you very much for your feedback
— Reply to this email directly, view it on GitHub https://github.com/marcel-licence/ML_SynthTools/issues/35#issuecomment-1666432487, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANWUZNFPPHZU47CQ4IRECDXTX4UBANCNFSM6AAAAAA25NHJAU . You are receiving this because you authored the thread.Message ID: @.***>
Yes sure: https://github.com/marcel-licence/ML_SynthTools/blob/main/src/es8388.h You will find there 'ES8388_ReadReg' and 'ES8388_WriteReg' Not sure if there is something wrong causing this error.
May be I found the problem.
In es8388.h file, at the ES8388_ReadReg function, you call Wire.endTransmission(false);
twice.
I'm not much expert on i2c wire library, but watching some examples I think the last call is unnecessary. Commenting out that line the error messages disappear.
Hope this helps.
uint8_t ES8388_ReadReg(uint8_t reg)
{
Wire.beginTransmission(ES8388_ADDR);
Wire.write(reg);
Wire.endTransmission(false);
uint8_t val = 0u;
if (1 == Wire.requestFrom(uint16_t(ES8388_ADDR), uint8_t(1), true))
{
val = Wire.read();
}
// Wire.endTransmission(false);
return val;
}
Thank you very much. Sounds good. Should Wire.endTransmission be called after the Wire.read instead of after calling it after Wire.write?
Sorry for late feedback... holiday time :)
Unfortunately the 22ccbac commit doesn't work. The DAC initialization hangs.
You have to call endTransmission
just after the last write, before to use requestFrom
.
Thank you very much for your feedback. I've updated the code again moving the endTransmission call: https://github.com/marcel-licence/ML_SynthTools/commit/f1c9ecbaa72baab1bd8131fdb56ec44f13090250 I didn't had the time to prepare a setup to test it.
Well done. Now it works fine.
I think we can consider the issue closed.
Thanks again for sharing your project as free software
I am very happy to hear that. New features and updates are in the queue. Thank you for feedback and have a great holiday time =)
I'm trying to execute EPiano and synth organ examples on my just arrived ESP32-AudioKit equipped with ES8388.
The board works with other libraries (arduino-audio-tool & arduino-audiokit), but I can't get working with this library.
I changed
board_audio_kit_es8388.h
with following:I also changed the config.h of example file to use Audiokit with ES8388:
At the boot, the serial console returns some errors about I2C CODEC initialization. I can play MIDI notes and they are printed in serial console, but no audio .
Here the boot log