Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Sd2Card' does not name a type #48

Open
Flash1705 opened this issue Nov 5, 2019 · 0 comments
Open

'Sd2Card' does not name a type #48

Flash1705 opened this issue Nov 5, 2019 · 0 comments

Comments

@Flash1705
Copy link

Hi
I am trying to compile the Card Info sketch and I get the following errors:

Arduino: 1.8.10 (Windows 7), Board: "WeMos D1 R1, 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

card_check:24:1: error: 'Sd2Card' does not name a type

Sd2Card card;

^

card_check:25:1: error: 'SdVolume' does not name a type

SdVolume volume;

^

card_check:26:1: error: 'SdFile' does not name a type

SdFile root;

^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino: In function 'void setup()':

card_check:45:8: error: 'card' was not declared in this scope

if (!card.init(SPI_HALF_SPEED, chipSelect)) {

    ^

card_check:57:11: error: 'card' was not declared in this scope

switch (card.type()) {

       ^

card_check:58:10: error: 'SD_CARD_TYPE_SD1' was not declared in this scope

 case SD_CARD_TYPE_SD1:

      ^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:58:10: note: suggested alternative:

In file included from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdCard/SdSpiCard.h:33:0,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/BlockDriver.h:32,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdFat.h:32,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS\src/SDFS.h:36,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD\src/SD.h:25,

             from C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:21:

C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdCard/SdInfo.h:101:15: note: 'sdfat::SD_CARD_TYPE_SD1'

const uint8_t SD_CARD_TYPE_SD1 = 1;

           ^

card_check:61:10: error: 'SD_CARD_TYPE_SD2' was not declared in this scope

 case SD_CARD_TYPE_SD2:

      ^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:61:10: note: suggested alternative:

In file included from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdCard/SdSpiCard.h:33:0,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/BlockDriver.h:32,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdFat.h:32,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS\src/SDFS.h:36,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD\src/SD.h:25,

             from C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:21:

C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdCard/SdInfo.h:103:15: note: 'sdfat::SD_CARD_TYPE_SD2'

const uint8_t SD_CARD_TYPE_SD2 = 2;

           ^

card_check:64:10: error: 'SD_CARD_TYPE_SDHC' was not declared in this scope

 case SD_CARD_TYPE_SDHC:

      ^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:64:10: note: suggested alternative:

In file included from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdCard/SdSpiCard.h:33:0,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/BlockDriver.h:32,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdFat.h:32,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS\src/SDFS.h:36,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD\src/SD.h:25,

             from C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:21:

C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdCard/SdInfo.h:105:15: note: 'sdfat::SD_CARD_TYPE_SDHC'

const uint8_t SD_CARD_TYPE_SDHC = 3;

           ^

card_check:72:8: error: 'volume' was not declared in this scope

if (!volume.init(card)) {

    ^

card_check:72:20: error: 'card' was not declared in this scope

if (!volume.init(card)) {

                ^

card_check:80:18: error: 'volume' was not declared in this scope

Serial.println(volume.fatType(), DEC);

              ^

card_check:96:3: error: 'root' was not declared in this scope

root.openRoot(volume);

^

card_check:99:11: error: 'LS_R' was not declared in this scope

root.ls(LS_R | LS_DATE | LS_SIZE);

       ^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:99:11: note: suggested alternative:

In file included from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatFile.h:36:0,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdFat.h:33,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS\src/SDFS.h:36,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD\src/SD.h:25,

             from C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:21:

C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatApiConstants.h:121:15: note: 'sdfat::LS_R'

const uint8_t LS_R = 8;

           ^

card_check:99:18: error: 'LS_DATE' was not declared in this scope

root.ls(LS_R | LS_DATE | LS_SIZE);

              ^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:99:18: note: suggested alternative:

In file included from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatFile.h:36:0,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdFat.h:33,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS\src/SDFS.h:36,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD\src/SD.h:25,

             from C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:21:

C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatApiConstants.h:117:15: note: 'sdfat::LS_DATE'

const uint8_t LS_DATE = 2;

           ^

card_check:99:28: error: 'LS_SIZE' was not declared in this scope

root.ls(LS_R | LS_DATE | LS_SIZE);

                        ^

C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:99:28: note: suggested alternative:

In file included from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatFile.h:36:0,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/ArduinoFiles.h:33,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatLib.h:27,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/SdFat.h:33,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS\src/SDFS.h:36,

             from C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD\src/SD.h:25,

             from C:\Users\George\Documents\Sketch Folder\Card_Check\card_check\card_check.ino:21:

C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat\src/FatLib/FatApiConstants.h:119:15: note: 'sdfat::LS_SIZE'

const uint8_t LS_SIZE = 4;

           ^

Multiple libraries were found for "SPI.h"
Used: C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SPI
Multiple libraries were found for "SD.h"
Used: C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SD
Not used: C:\Program
Not used: C:\Users\George\Documents\Arduino\libraries\SD
Multiple libraries were found for "SDFS.h"
Used: C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\SDFS
Multiple libraries were found for "SdFat.h"
Used: C:\Users\George\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\libraries\ESP8266SdFat
exit status 1
'Sd2Card' does not name a type

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant