can not compile SD library file Cardinfo

This is really a programming issue but I can not figure out how to post on the Arduino Forum.

I have the SparkFun Thing plus Woom and the Adafruit ADALOGGER.

The first 4 active lines of the file Cardinfo are:


created 28 Mar 2011

by Limor Fried

modified 9 Apr 2012

by Tom Igoe

*/

// include the SD library:

#include <SPI.h>

#include <SD.h>

// set up variables using the SD utility library functions:

Sd2Card card;

SdVolume volume;

SdFile root;


after compiling, the first two errors are:


Rudys_CardInfo:27:1: error: ‘Sd2Card’ does not name a type

Sd2Card card;

^

Rudys_CardInfo:28:1: error: ‘SdVolume’ does not name a type

SdVolume volume;


If this is not the correct forum for this topic, please head me in the correct directiom.

I’ve got numerous sketches with the same declarations and they work. The library definitions for those 3 classes are in “SD.h” and since you have that #included and the include didn’t give an error message, it means that you might have another “SD.h” in your include path which gets found first and used, and this library doesn’t have those classes defined.

Can you search your arduino paths for “SD.h”? There should only be one, and it should contain a class definition for those 3 classes.

Thanks. That got me past the first hurdle. Now the compiler gets down to opening my sketch again stops with the error “don’t recognize board” for the pininfo. here is the address that does not have the correct pin info:

C:\Program Files (x86)\Arduino\libraries\SD\src\utility

When I go to the pininfo file, it lists for all kinds of Arduino boards, but not My “Adafruit ESP32Feather”.

So, where would I look for the Feather pin printout and how would I get it into the correct src folder?

Thanks again for your help. This experience should help me on my next SparkFun project.

I’m not sure what you mean by the “pininfo” file? I wrote an example program for the Esp32 Feather (and the BME680) a while back that logs data to a SD card, perhaps you could take a look at this program and what I did there. The program is part of the [BME680 Library library, the sketch is at https://github.com/SV-Zanshin/BME680/tr … FiDemo.ino](GitHub - Zanduino/BME680: Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor)

Thanks. I will study your sketch. I did find a file that describes the Feather pinout, but have not found a way to circumvent the call that is giving me trouble.

This will give me a lot to think about.

Additional info.

Although the simple programs like CardInfo only call for SD.h, it looks like an addon program, sdfatlib, got loaded which is now called for in SD.h. Now the sketch, Sd2PinMap.h, gets called. This program gives pinout definitions to all kinds of Arduino microprocessors, but not the ADAFruit Feather.

I tried to change the sketch, Sd2PinMap.h, but my HP laptop Windows 10 tells me I don’t have permission to change this program, even though I should have administrator permissions.

So, I am stuck until I figure out how to change this sketch or delete it and do like you did on your BME680 sketch and input the pinout directly.

,

OK> I got past that. Now I get error that board can not be initialized. So, I will close out this post because it appears to be a hardware or interface problem and not a sketch problem.

I thank you again for the insight and the direction I needed to go to solve that problem.