Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

SPI and I2C

Phil Schatzmann edited this page Feb 25, 2023 · 23 revisions

It seems that most people are not familiar with their boards.

I2C

I2C channel 1 (Wire1) is used by default to communicate with the audio chip. 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

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.

Clone this wiki locally