This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
GPIO Overview by Selected Board
Phil Schatzmann edited this page May 26, 2023
·
29 revisions
For the audio to work with your board you need to select the right audio chip (e.g. ES8388) and have the right I2C and I2S pins defined. Unfortunately there is a big variety of different alternatives.
Selected Boards:
- 1 lyrat_v4_3 (ES8388)
- 2 lyrat_v4_2 (ES8388) - DRAFT Not Tested
- 3 lyrat_mini_v1_1 (ES8311) - DRAFT Not Tested
- 4 esp32_s2_kaluga_1_v1_2 (ES8311) - DRAFT Not Tested
- 5 ai_thinker (ES8388) 2957 3478
- 6 ai_thinker (AC101) 2762 2957
- 7 ai_thinker (ES8388) 2957
- 10 generic_es8388
- 11 generic_es8311
Interface | Pin | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 |
---|---|---|---|---|---|---|---|---|---|---|
I2C | sda | 18 | 18 | 18 | 8 | 33 | 33 | 18 | 33 | 18 |
I2C | scl | 23 | 23 | 23 | 7 | 32 | 32 | 23 | 32 | 23 |
I2S | bck | 5 | 5 | 5 | 18 | 27 | 27 | 5 | 27 | 5 |
I2S | ws | 25 | 25 | 25 | 17 | 25 | 26 | 25 | 25 | 25 |
I2S | data_out | 26 | 26 | 26 | 12 | 26 | 25 | 26 | 26 | 26 |
I2S | data_in | 35 | 35 | 35 | 46 | 35 | 35 | 35 | 35 | 35 |
I2S | mclk | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
SPI | cs | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 |
SPI | miso | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
SPI | mosi | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 | 15 |
SPI | clk | 14 | 14 | 14 | 14 | 14 | 14 | 14 | 14 | 14 |
The selected board is loading the information which is defined in src/audio_board as default values. These values however can be changed by overwriting the AudioKitConig values.
When you use generic versions with PlatformIO, you can also override each pin individually in the platformio.ini file. For the available defines please check the es8388 board_def.h or the es8311 board_def.h.
The following defines are usually made available in the board_def.h:
- PIN_AUDIO_KIT_SD_CARD_CS
- PIN_AUDIO_KIT_SD_CARD_MISO
- PIN_AUDIO_KIT_SD_CARD_MOSI
- PIN_AUDIO_KIT_SD_CARD_CLK
- SDCARD_INTR_GPIO
- BUTTON_REC_ID
- BUTTON_MODE_ID
- BUTTON_SET_ID
- BUTTON_PLAY_ID
- BUTTON_VOLUP_ID
- BUTTON_VOLDOWN_ID
- PIN_KEY1
- PIN_KEY2
- PIN_KEY3
- PIN_KEY4
- PIN_KEY5
- PIN_KEY6
- AUXIN_DETECT_GPIO
- PA_ENABLE_GPIO
- GREEN_LED_GPIO
- RED_LED_GPIO