Description
Basic Infos
Hardware
Adafruit HUZZAH32 - ESP32 Feather Board
https://www.adafruit.com/product/3405
Adalogger FeatherWing - RTC + SD Add-on For All Feather Boards
https://www.adafruit.com/product/2922
Adafruit Ultimate GPS FeatherWing
https://www.adafruit.com/product/3133
FeatherWing Tripler Mini Kit - Prototyping Add-on For Feathers
https://www.adafruit.com/product/3417
OS, IDE, and Commit
OS: Windows 10 Professional
IDE: 1.8.5
COMMIT?: via 'git branch -v'
* master b855eb2 * arduino-esp32 release mgmt. update (#1557)
Settings in IDE
Module: Adafruit ESP32 Feather
CPU Frequency: 80Mhz
Core Debug Level: None
Description
While bringing up the forementioned hardware assembly, my colleague and I found we could not compile the 'CardInfo' example sketch contained within the Arduino 'SD' library:
Arduino: 1.8.5 (Windows 10), Board: "Adafruit ESP32 Feather, 80MHz, 921600, None"
CardInfo:27: error: 'Sd2Card' does not name a type
Sd2Card card;
...
...
Pressing onward, we next tried the 'SD_Test.ino' example sketch within the SD(esp32) library. The sketch compiled OK, but when ran produced a 'Card Mount Failed' message. Suspecting an incorrect SD card chip-select assignment, we next looked at the 'pins_arduino.h' variant file defined for the 'ESP32 Feather' board:
static const uint8_t SS = 2;
The Adafruit website for the RTC/SD board identifies GPIO pin 33 as the required pin, and changing the variant file's SS pin definition to this value resolved the issue.
Is the 'SS=33' assignment for the RTC/SD/ESP32 feather board combination a once-only assignment, or can the change be made permanent within the variant file?
Copy Author: @ladyada