Go Down

Topic: sdFat does not name a type (Read 314 times) previous topic - next topic

AHETEKU

thanks a lot guys am most grateful
but there is another problem after correcting wprogram.h

the problem now is sdFat does not name a type and below is the erroe and my code please help me out


Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

In file included from C:\Users\STEADF~1\AppData\Local\Temp\arduino_modified_sketch_345838\sketch_jun23b.ino:20:0:

C:\Program Files (x86)\Arduino\libraries\SdFat/SdFat.h:283:8: error: conflicting return type specified for 'virtual void SdFile::write(uint8_t)'

   void write(uint8_t b);

        ^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,

                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,

                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:232,

                 from sketch\sketch_jun23b.ino.cpp:1:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:51:20: error:   overriding 'virtual size_t Print::write(uint8_t)'

     virtual size_t write(uint8_t) = 0;

                    ^

sketch_jun23b:23: error: 'SdFat' does not name a type

 SdFat sd;

 ^

C:\Users\STEADF~1\AppData\Local\Temp\arduino_modified_sketch_345838\sketch_jun23b.ino: In function 'void setup()':

sketch_jun23b:45: error: 'sd' was not declared in this scope

   if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt();

        ^

C:\Users\STEADF~1\AppData\Local\Temp\arduino_modified_sketch_345838\sketch_jun23b.ino: In function 'void loop()':

sketch_jun23b:62: error: 'O_AT_END' was not declared in this scope

     if (!myFile.open(photoTitle, O_RDWR | O_CREAT | O_AT_END)) {

                                                     ^

sketch_jun23b:63: error: 'sd' was not declared in this scope

       sd.errorHalt("opening photoTitle.txt for write failed");

       ^

exit status 1
'SdFat' does not name a type

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




/***************************
PIR Motion Detection - Camera Capture

by Jennifer Case
5/21/2013

Parts:
-PIR Sensor
-SD Card Breakout Board
-TTL Camera

Pin 2,3 - Camera
Pin 8 - PIR Sensor
Pin 10 - CS/D3
Pin 11 - CMD
Pin 12 - D0
Pin 13 - CLK
****************************/
#include <SoftwareSerial.h>
#include <SdFat.h>

//SD Card
SdFat sd;
SdFile myFile;
int picCnt = 0;

//Camera
byte incomingbyte;
SoftwareSerial cameraSerial = SoftwareSerial(2, 3);   //Configure pin 2 and 3 as soft serial port
int a=0x0000,j=0,k=0,count=0;   //Read Starting address       
uint8_t MH,ML;
boolean EndFlag=0;

//Declare pins
const int chipSelect = 10;
int pirPin = 8;

void setup() {
  Serial.begin(19200); //start serial
  cameraSerial.begin(38400); //start serial with camera
 
  // Initialize SdFat or print a detailed error message and halt
  // Use half speed like the native library.
  // change to SPI_FULL_SPEED for more performance.
  if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt();
 
  SendResetCmd(); //allows camera to take pictures
  delay(3000); //delay necessary for camera reset
}

void loop() {
  int val = digitalRead(pirPin); //read from PIR sensor
 
  //when val is HIGH, there is motion -> take pictures
  if (val == HIGH) {
    //create title for images
    char photoTitle[25] = {};
    sprintf(photoTitle, "pic%d.txt", picCnt);
    //Serial.println(photoTitle);
   
    //make sure file can be created, otherwise print error
    if (!myFile.open(photoTitle, O_RDWR | O_CREAT | O_AT_END)) {
      sd.errorHalt("opening photoTitle.txt for write failed");
    }
   
    //Serial.print("Writing to file...");
   
    SendTakePhotoCmd(); //take photo
    delay(200); //delay to make sure there is no drop in the data
    //Serial.println("Start pic");
 
    while(cameraSerial.available()>0) {
      incomingbyte=cameraSerial.read(); //clear unneccessary serial from camera
    }
    byte b[32];
   
    while(!EndFlag) { 
      j=0;
      k=0;
      count=0;
      SendReadDataCmd(); //command to get picture from camera
             
      delay(75); //delay necessary for data not to be lost
      while(cameraSerial.available()>0) {
        incomingbyte=cameraSerial.read(); //read serial from camera
        k++;
        if((k>5)&&(j<32)&&(!EndFlag)) {
          b[j]=incomingbyte;
          if((b[j-1]==0xFF)&&(b[j]==0xD9))
          EndFlag=1; //when end of picture appears, stop reading data                         
          j++;
          count++;
        }
      }
             
      for(j=0;j<count;j++) { //store picture into file
        if(b[j]<0x10)
          myFile.print("0");
        myFile.print(b[j], HEX);
      }
      myFile.println();
    }
   
    StopTakePhotoCmd(); //stop this picture so another one can be taken
    EndFlag = 0; // reset flag to allow another picture to be read
    //Serial.println("End of pic");
   
    myFile.close(); //close file
    //Serial.println("done.");
    //Serial.println();
   
    picCnt++; //increment value for next picture
  }
}

//Send Reset command
void SendResetCmd() {
  cameraSerial.write((byte)0x56);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x26);
  cameraSerial.write((byte)0x00);   
}

//Send take picture command
void SendTakePhotoCmd() {
  cameraSerial.write((byte)0x56);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x36);
  cameraSerial.write((byte)0x01);
  cameraSerial.write((byte)0x00);
   
  a = 0x0000; //reset so that another picture can taken
}

void FrameSize() {
  cameraSerial.write((byte)0x56);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x34);
  cameraSerial.write((byte)0x01);
  cameraSerial.write((byte)0x00); 
}

//Read data
void SendReadDataCmd() {
  MH=a/0x100;
  ML=a%0x100;
     
  cameraSerial.write((byte)0x56);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x32);
  cameraSerial.write((byte)0x0c);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x0a);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)MH);
  cameraSerial.write((byte)ML);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x20);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x0a);

  a+=0x20;
}

void StopTakePhotoCmd() {
  cameraSerial.write((byte)0x56);
  cameraSerial.write((byte)0x00);
  cameraSerial.write((byte)0x36);
  cameraSerial.write((byte)0x01);
  cameraSerial.write((byte)0x03);       
}


Delta_G

It looks like you haven't taken time to read the "How to use this forum - please read" post at the top of every board.  Please take a moment to review that.  It explains among other things how to properly post code.

It looks like you are getting code from some ancient source.  Perhaps the best thing for you to do would be to find a source of newer code for what you want to do. 
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

sterretje

I've copied your code from reply #5 (please modify your reply to include code tags), installed the SdFat library using the library manger and it happily compiled (IDE 1.8.5).

There are some warnings relating to SoftwareSerial, but no errors.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

AHETEKU

#7 please send me your e-mail address
this is mine aheteku@gmail.com
i have installed the sdfat library but still please

Coding Badly


@AHETEKU, stop cross-posting.  Two threads trashed.


AHETEKU

#5
Jun 23, 2018, 06:55 pm Last Edit: Jun 23, 2018, 07:22 pm by AHETEKU Reason: typing error
please am having the same problem here

error compilling for board arduino/genuino uno

please some one should help me out below is my code n error please

Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:22:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorHalt(Print* pr) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void errorHalt(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:23:16: error: 'errorPrint' was not declared in this scope

errorPrint(pr);

            ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:27:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorHalt(Print* pr, char const* msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void errorHalt(Print*, const char*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:28:21: error: 'errorPrint' was not declared in this scope

errorPrint(pr, msg);

                 ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:32:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorPrint(Print* pr) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void errorPrint(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:33:22: error: 'cardErrorCode' was not declared in this scope

if (!cardErrorCode()) {

                  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:37:27: error: 'cardErrorCode' was not declared in this scope

pr->print(cardErrorCode(), HEX);

                       ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:39:29: error: 'cardErrorData' was not declared in this scope

pr->println(cardErrorData(), HEX);

                         ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:42:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorPrint(Print* pr, char const* msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:48:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorHalt(Print* pr) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void initErrorHalt(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:49:20: error: 'initErrorPrint' was not declared in this scope

initErrorPrint(pr);

                ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:53:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorHalt(Print* pr, char const *msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:58:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorPrint(Print* pr) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void initErrorPrint(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:59:21: error: 'cardErrorCode' was not declared in this scope

if (cardErrorCode()) {

                 ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:65:18: error: 'vol' was not declared in this scope

} else if (vol()->fatType() == 0) {

              ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:67:19: error: 'vwd' was not declared in this scope

} else if (!vwd()->isOpen()) {

               ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:74:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorPrint(Print* pr, char const *msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:80:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorPrint(Print* pr, const __FlashStringHelper* msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:86:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorHalt(Print* pr, const __FlashStringHelper* msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:91:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorHalt(Print* pr, const __FlashStringHelper* msg) {

  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:96:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorPrint(Print* pr, const __FlashStringHelper* msg) {

  ^

exit status 1
Error compiling for board Arduino/Genuino Uno.

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





AHETEKU

#6
Jun 23, 2018, 07:05 pm Last Edit: Jul 19, 2018, 10:28 pm by Coding Badly
this is the code
Code: [Select]

/***************************
PIR Motion Detection - Camera Capture


Parts:
-PIR Sensor
-SD Card Breakout Board
-TTL Camera

Pin 2,3 - Camera
Pin 8 - PIR Sensor
Pin 10 - CS/D3
Pin 11 - CMD
Pin 12 - D0
Pin 13 - CLK
****************************/
#include <SoftwareSerial.h>
#include <SdFat.h>

//SD Card
SdFat sd;
SdFile myFile;
int picCnt = 0;

//Camera
byte incomingbyte;
SoftwareSerial cameraSerial = SoftwareSerial(2, 3);   //Configure pin 2 and 3 as soft serial port
int a=0x0000,j=0,k=0,count=0;   //Read Starting address       
uint8_t MH,ML;
boolean EndFlag=0;

//Declare pins
const int chipSelect = 10;
int pirPin = 8;

void setup() {
Serial.begin(19200); //start serial
cameraSerial.begin(38400); //start serial with camera

// Initialize SdFat or print a detailed error message and halt
// Use half speed like the native library.
// change to SPI_FULL_SPEED for more performance.
if (!sd.begin(chipSelect, SPI_HALF_SPEED)) sd.initErrorHalt();

SendResetCmd(); //allows camera to take pictures
delay(3000); //delay necessary for camera reset
}

void loop() {
int val = digitalRead(pirPin); //read from PIR sensor

//when val is HIGH, there is motion -> take pictures
if (val == HIGH) {
//create title for images
char photoTitle[25] = {};
sprintf(photoTitle, "pic%d.txt", picCnt);
//Serial.println(photoTitle);

//make sure file can be created, otherwise print error
if (!myFile.open(photoTitle, O_RDWR | O_CREAT | O_AT_END)) {
 sd.errorHalt("opening photoTitle.txt for write failed");
}

//Serial.print("Writing to file...");

SendTakePhotoCmd(); //take photo
delay(200); //delay to make sure there is no drop in the data
//Serial.println("Start pic");

while(cameraSerial.available()>0) {
 incomingbyte=cameraSerial.read(); //clear unneccessary serial from camera
}
byte b[32];

while(!EndFlag) { 
 j=0;
 k=0;
 count=0;
 SendReadDataCmd(); //command to get picture from camera
       
 delay(75); //delay necessary for data not to be lost
 while(cameraSerial.available()>0) {
   incomingbyte=cameraSerial.read(); //read serial from camera
   k++;
   if((k>5)&&(j<32)&&(!EndFlag)) {
     b[j]=incomingbyte;
     if((b[j-1]==0xFF)&&(b[j]==0xD9))
     EndFlag=1; //when end of picture appears, stop reading data                         
     j++;
     count++;
   }
 }
         
 for(j=0;j<count;j++) { //store picture into file
   if(b[j]<0x10)
     myFile.print("0");
   myFile.print(b[j], HEX);
 }
 myFile.println();
}

StopTakePhotoCmd(); //stop this picture so another one can be taken
EndFlag = 0; // reset flag to allow another picture to be read
//Serial.println("End of pic");

myFile.close(); //close file
//Serial.println("done.");
//Serial.println();

picCnt++; //increment value for next picture
}
}

//Send Reset command
void SendResetCmd() {
cameraSerial.write((byte)0x56);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x26);
cameraSerial.write((byte)0x00);   
}

//Send take picture command
void SendTakePhotoCmd() {
cameraSerial.write((byte)0x56);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x36);
cameraSerial.write((byte)0x01);
cameraSerial.write((byte)0x00);

a = 0x0000; //reset so that another picture can taken
}

void FrameSize() {
cameraSerial.write((byte)0x56);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x34);
cameraSerial.write((byte)0x01);
cameraSerial.write((byte)0x00); 
}

//Read data
void SendReadDataCmd() {
MH=a/0x100;
ML=a%0x100;
 
cameraSerial.write((byte)0x56);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x32);
cameraSerial.write((byte)0x0c);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x0a);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)MH);
cameraSerial.write((byte)ML);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x20);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x0a);

a+=0x20;
}

void StopTakePhotoCmd() {
cameraSerial.write((byte)0x56);
cameraSerial.write((byte)0x00);
cameraSerial.write((byte)0x36);
cameraSerial.write((byte)0x01);
cameraSerial.write((byte)0x03);       
}


Moderator edit: [code] [/code] tags added.

AHETEKU


AHETEKU

please am very sorry for any inconvenience please forgive me

by the way thanks for the corrections

the probelm am having now is error  compilling board arduino/genuino uno

Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:22:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorHalt(Print* pr) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void errorHalt(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:23:16: error: 'errorPrint' was not declared in this scope

  errorPrint(pr);

               ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:27:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorHalt(Print* pr, char const* msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void errorHalt(Print*, const char*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:28:21: error: 'errorPrint' was not declared in this scope

  errorPrint(pr, msg);

                    ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:32:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorPrint(Print* pr) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void errorPrint(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:33:22: error: 'cardErrorCode' was not declared in this scope

  if (!cardErrorCode()) {

                     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:37:27: error: 'cardErrorCode' was not declared in this scope

  pr->print(cardErrorCode(), HEX);

                          ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:39:29: error: 'cardErrorData' was not declared in this scope

  pr->println(cardErrorData(), HEX);

                            ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:42:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorPrint(Print* pr, char const* msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:48:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorHalt(Print* pr) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void initErrorHalt(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:49:20: error: 'initErrorPrint' was not declared in this scope

  initErrorPrint(pr);

                   ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:53:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorHalt(Print* pr, char const *msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:58:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorPrint(Print* pr) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: In function 'void initErrorPrint(Print*)':

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:59:21: error: 'cardErrorCode' was not declared in this scope

  if (cardErrorCode()) {

                    ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:65:18: error: 'vol' was not declared in this scope

  } else if (vol()->fatType() == 0) {

                 ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:67:19: error: 'vwd' was not declared in this scope

  } else if (!vwd()->isOpen()) {

                  ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp: At global scope:

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:74:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorPrint(Print* pr, char const *msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:80:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorPrint(Print* pr, const __FlashStringHelper* msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:86:6: error: 'SdFatBase' has not been declared

void SdFatBase::errorHalt(Print* pr, const __FlashStringHelper* msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:91:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorHalt(Print* pr, const __FlashStringHelper* msg) {

     ^

C:\Program Files (x86)\Arduino\libraries\SdFat\src\SdFat.cpp:96:6: error: 'SdFatBase' has not been declared

void SdFatBase::initErrorPrint(Print* pr, const __FlashStringHelper* msg) {

     ^

exit status 1
Error compiling for board Arduino/Genuino Uno.

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

UKHeliBob

I am sure that it will be of no consolation to you but it compiles OK for me

Code: [Select]

Sketch uses 14120 bytes (45%) of program storage space. Maximum is 30720 bytes.
Global variables use 1020 bytes (49%) of dynamic memory, leaving 1028 bytes for local variables. Maximum is 2048 bytes.


IDE 1.8.5
Win 10
Nano board
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

sterretje

AHETEKU posted the same question a few days ago and the then code also compiled for me.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

ChrisTenone

This suggests the problem lies in the installation. Sounds like the libraries may be corrupted, or in the wrong place.
I don't got to show you no stinkin' signature.

AHETEKU

kk thanks very much

but am still having the same problem

am using windows 8.1 and arduino version 1.8.5

i dont know what to do now

AHETEKU

kk thanks very much

but am still having the same problem

am using windows 8.1 and arduino version 1.8.5

i dont know what to do now

Delta_G

Maybe it would be smart to post this on a thread that doesn't say "SOLVED" in the title so people don't think that the problem is already solved and then they read. 

Maybe it would be a good idea to read the posting guidelines I keep trying to point you to and post your code properly so more people will be willing to help. 

Those seem like to smart options to me.
|| | ||| | || | ||  ~Woodstock

Please do not PM with technical questions or comments.  Keep Arduino stuff out on the boards where it belongs.

Go Up