-
Notifications
You must be signed in to change notification settings - Fork 42
SPI and I2C
It seems that most people are not familiar with their boards.
I2C is used to communicate with the audio chip. We use Wire1: This allows you to use the Wire object in your code w/o impacting the AudioKit.
This can be changed - if needed - with the help of AUDIOKIT_WIRE in AudioKitSettings.h. You can also decide to use the original ESP32 I2C API based implementation instead of the wire library.
If the I2C communication is failing it can have multiple reasons:
- different boards are using different I2C pins, so your pin mapping might be wrong
- You try to use the the AC101 driver on an ES8388 board (or vice versa)
so it is critical that you select the right board number
SPI (using VSPI) is used by default to communicate with the SD Drive. This can be configured with the help of AUDIOKIT_SD_SPI in AudioKitSettings.h. Please note that you don't need SPI if you access the drive via SDMMC. In this case you can deactivate it by setting AUDIOKIT_SETUP_SD 0.
Fortunately the SD related pins are the same across all boards!
Further information on how to use the SD drive can be found in the next chapter.