Compilation error when including SPI.h and SD.h: "Multiple libraries found"

Asked 2 years ago, Updated 2 years ago, 69 views

"When I included SPI.h and SD.h, ""Multiple libraries found"" is displayed, resulting in a compilation error."The development environment is ArduinoIDE.

Error Message Received

Multiple libraries found for "SPI.h" Used: C:\Users\admin\AppData\Local\Arduino15\packages\SPRESENSE\hardware\spresense\1.4.2\libraries\SPI
Multiple libraries found for "SD.h"Used: C:\Program Library SPI version 1.2.0 in the following folders: C:\Users\admin\AppData\Local\Arduino15\packages\SPRESENSE\hardware\spresense\1.4.2\libraries\SPI In the library SD version 1.2.1 of the following folders are in use.

spresense

2022-09-30 11:26

1 Answers

If you are using an SD card on the SPRESENSE board, click
Include SDHCI.h instead of SD.h and use it as follows:

#include<SDHCI.h>
SDClass SD;

Documentation: SDHCI Library or
There are various examples that use SD cards, so I think they will be helpful.


2022-09-30 11:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.