- Clone the repository by
git clone https://github.com/trombik/esp-adf-component-ai-thinker-esp32-a1s.git
- Create
components
directory in a project directory - Create a symlink to
idf-component-ai-thinker-esp32-a1s/components/ai-thinker-esp32-a1s
undercomponents
. - Run
idf.py menuconfig
- Select
Custom audio board
underAudio HAL
>Audio board
- Select a custom board under
Custom Audio Board
There are two different Ai Thinker A1S chips in the market: one with ac101
audio codec, another with es8388
. Both chips has the same name. The one with
ac101
is EoLed, the vendor claims. In addition, there are different Ai
Thinker A1S Audio Kit boards in the market: A1S es8388
chips with different
pin assignments.
- Ai Thinker A1S with
es8388
variant 5 (probably the latest variant available in AliExpress) - Ai Thinker A1S with
es8388
variant 7
Here is a list of tested peripherals:
- Audio output to speakers
- Keys
- On-board LEDs
- Bluetooth
- Mic input
- Line input
- On-board microphones
- SD card
- Battery charger
To test speaker outputs, use ${ADF_PATH}/examples/player/pipeline_http_mp3
.
To test keys, use ${ADF_PATH}/examples/checks/check_board_buttons
.
Name | Function in esp-adf |
---|---|
KEY1 |
Mode |
KEY2 |
Rec |
KEY3 |
Play |
KEY4 |
Set |
KEY5 |
Volume down |
KEY6 |
Volume up |
Note that KEY2
cannot be used with SD card because the GPIO
for KEY2
is
shared with SD card peripheral.
According to the schematic,
ADC Button Peripheral
is supposed to work. However, my board does not have necessary resistors
(R60
, R61
...). If yours has them,
give CONFIG_AI_THINKER_ESP32_A1S_ES8388_BUTTON_KEY_ADC
a try.
The board has two red LEDs connected to GPIO pins. By default, only one LED is
useable. Unlike official development boards from espressif
, the color is
red. esp-adf
provides get_blue_led_gpio()
and get_green_led_gpio()
, not
one for red LED.
To test the LED, use ${ADF_PATH}/examples/checks/check_display_led
.
To test a2dp
sink, use ${ADF_PATH}/examples/player/pipeline_a2dp_sink_stream
.
a2dp
source has not been tested.
To test on-board microphones, use ${ADF_PATH}/examples/recorder/pipeline_raw_http
.
See also "Known issues" below.
The battery charger should work, but no GPIO pin is connected to the charger
circuit. As such, the battery service in esp-adf
cannot be used.
esp-idf
v5.0.2
esp-adf
master
The Audio Kit board has hardware bugs. Two capacitors must be connected to on-board microphones. See a post in Home Assistant forum.
- The‘AI Thinker Audio Kit' Arduino Challenge A series of posts about Ai Thinker ESP32 A1S Audio Kit
- Schematic
- arduino-audiokit/tree/main/src/audio_board An implementation for Arduino
- ES8388 User Guide