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

Problems with the SD Drive or some conflicting Buttons

Phil Schatzmann edited this page Sep 20, 2022 · 32 revisions

SD / SDFAT Library

The working of the SD drive depends on the dip switches. Please check the documentation of your board. Usually the setting OFF, ON, ON, OFF, OFF is recommended.

Please note that an active SD drive might also deactivate some of the buttons because the same GPIOs are used.

You can also switch off the automatic SD initialization:

  • At compile time: (e.g. in the AudioKitSettings.h) by defining AUDIOKIT_SETUP_SD to 0 if you do not intent to use the SD card.
  • At runtime: by setting the sd_active to false in the AudioKitConfig that is passed to the begin method. Example:
  auto cfg = kit.defaultConfig();
  cfg.bits_per_sample = 16;
  cfg.channels = 1;
  cfg.sample_rate = 8000;
  cfg.sd_active = false;
  kit.begin(cfg);

In some exceptional cases you might want to use the SD of the AudioKit w/o setting up any AudioKitStream. In this case you have to initialize the SD SPI pins yourself:

// These pins are defined in the HAL
// #define PIN_AUDIO_KIT_SD_CARD_CS 13  
// #define PIN_AUDIO_KIT_SD_CARD_MISO 2
// #define PIN_AUDIO_KIT_SD_CARD_MOSI 15
// #define PIN_AUDIO_KIT_SD_CARD_CLK  14

void setup() {
    SPI.begin(PIN_AUDIO_KIT_SD_CARD_CLK, PIN_AUDIO_KIT_SD_CARD_MISO, PIN_AUDIO_KIT_SD_CARD_MOSI, PIN_AUDIO_KIT_SD_CARD_CS);
    ...

SDMMC Library

All DIP Switches must be in the on position

Formatting

If you have any issues with the formatting I suggest to use the official SD Formatter

Clone this wiki locally