Ai-Thinker-Open / ESP32-A1S-AudioKit

Ai-Thinker AudioKit Board SDK - 安信可 esp32-a1s 音频模组开发板
Other
132 stars 63 forks source link

I2C pins defined, no result #5

Closed Patsjemoe closed 4 years ago

Patsjemoe commented 4 years ago

Hi, I was told that I could use all pins as I2C, so I took IO5 and IO18 available on a connector. I defined them as follows :

define SDA_PIN GPIO_NUM_5

define SCL_PIN GPIO_NUM_18

As on a basic dev. board with wroom-32 , I defined pins, and used the same i2c_master_init(); ssd1306_init(); Also, connected the SSD1306 Oled display in the same way. Unfortunately, I only get 1 puls on the pins. I use also #include "driver/i2c.h", but saw that there is also a i2c_bus.H in de drivers dir from esp-adf. Do I need to include this in some way ? Regards Ludo

Patsjemoe commented 4 years ago

it is very confusing : I tried to initialise board pins io5 and io18 with

define SDA_PIN GPIO_NUM_5

define SCL_PIN GPIO_NUM_18:

which did not work, no scl and sda on these pins. Then found out that in the ai_thinker_audio_kit_v2_2, these pins are allocated to buttons.

define BUTTON_VOLUP_ID GPIO_NUM_18

define BUTTON_VOLDOWN_ID GPIO_NUM_5

In ai_thinker_audio_kit_v2_2 board pins config.c is specified : i2c_config->sda_io_num = GPIO_NUM_33; i2c_config->scl_io_num = GPIO_NUM_32; But these pins are not available on the board. How can you get SCL and SDA to the io5 and io18 on the board ??

Patsjemoe commented 4 years ago

Hi , looking further in the schematics, I found that io5, 18,23,19 are used for the key inputs. If they are dedicated for the keys, why are they then brought out to the connector, if they cannot be used ? I wonder which pins can really be used for I2C on the audio kit ? It looks as the spec says I2C, but that it cannot be used. I hope someone can clarify this ?