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

A1S Audiokit - I2C connection with ES8388 and another device, e.g. 20x4 LCD #574

Open
devwmbr opened this issue Dec 13, 2024 · 3 comments
Open
Labels

Comments

@devwmbr
Copy link

devwmbr commented Dec 13, 2024

Hello,

I started successfuly ESP32 A1S example ( https://github.com/schreibfaul1/ESP32-audioI2S/tree/master/examples/ESP32_A1S ) on my A1S Audio kit (v2.2, A436), but I have problem with 20x4 alphanumeric LCD via I2C connection on pins IO21, IO22 (pcb top right connector ). The display itself working ok on Audiokit, but with together example, Serial.print() returns DAC connection failed.
My version Audiokit properly works with 32 and 33 I2C pins like in oryginal .ino example (lines 36-37 in .ino file).
I saw that object creating order in Setup() matters.
If I create like this:

LCD.begin();
while (not dac.begin(IIC_DATA, IIC_CLK))
    {
        Serial.printf("Failed!\n");
        delay(1000);
    }

display working ok, but DAC connection failed.
If I create like this:

while (not dac.begin(IIC_DATA, IIC_CLK))
    {
        Serial.printf("Failed!\n");
        delay(1000);
    }
LCD.begin();

display is only backlighted, DAC connection is OK

Is there any conflict with 21,22 I2C and internal 32,33 I2C?

Regards
Devwmbr

@schreibfaul1
Copy link
Owner

maybe like this:

TwoWire i2cBusOne = TwoWire(0);
TwoWire i2cBusTwo = TwoWire(1);
ES8388 dac(&i2cBusOne);
if(!dac.begin(I2C_DAC_SDA, I2C_DAC_SCL, 400000)) { log_e("The DAC was not be initialized"); }
....

@devwmbr
Copy link
Author

devwmbr commented Dec 16, 2024

Hello,
Yesterday evening I tried another library: LiquidCrystal_PCF8574 where author in comment section gave example similar like yours
and now working great.
Currently my code looks like below:

#include "LiquidCrystal_PCF8574.h"
TwoWire Wire_1 = TwoWire(0x27);
LiquidCrystal_PCF8574 lcd(0x27);
void setup()
{
 // oryginal source without any changes

    /* LCD  */
    Wire_1.begin(21, 22);      // custom i2c port on ESP
    Wire_1.setClock(100000);   // standard 100kHz speed
    lcd.begin(16, 2, Wire_1);
    lcd.setBacklight(255);


 // oryginal source without any changes

}

I will try today evening your approach.
Thank you very much.

Regards

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants