After using the AI Thinker AudioKit I wanted to make sure that my libraries also work with the ESP32 LyraT Board from Espressif.

There were basically just 2 stumbling blocks:

  • Deploying Code: From the AudioKit I was used that I can plug in the UART cable and upload the code from Arduino w/o pushing any buttons. This is different in LyraT. You need to connect both the UART and Power Cable and then you need to execute the following sequence in order to set the board into upload mode:
    • push down the BOOT button
    • push down the RST button
    • release the RST button
    • release the BOOT button
  • Using the SD drive: The documentation states that all the switches must be in the OFF position. I was struggling quite some time until I decided to try them in the ON position: and like magic it started to work.

This logic is part of my AudioKit but if you want to use the SD examples provided by Arduino these are the changes that you need to implement:

#define SD_CARD_CS 13
#define SD_CARD_MISO 2
#define SD_CARD_MOSI 15
#define SD_CARD_CLK  14
...
// setup SPI
pinMode(SD_CARD_CS, OUTPUT);
digitalWrite(SD_CARD_CS, HIGH);
SPI.begin(SD_CARD_CLK, SD_CARD_MISO, SD_CARD_MOSI, SD_CARD_CS);
// setup SD
if(!SD.begin(SD_CARD_CS)){
    Serial.println("Card Mount Failed");
    return;
}
...    

Finally I needed to extend my generic button logic in my AudioTools library because unlike the AudioKit, LyraT is using some capacitive touch buttons…

Libraries


2 Comments

jon · 2. February 2022 at 21:33

I am trying to use audio kit with this board but under examples when I select headphone output I am getting error “Error compiling for board ESP32 Dev Module.” what board should I select?

    pschatzmann · 3. February 2022 at 2:09

    please open an issue on github

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *