diff --git a/examples/showBMP_not_Uno/showBMP_not_Uno.ino b/examples/showBMP_not_Uno/showBMP_not_Uno.ino index 6b1c278..3cbe5c2 100644 --- a/examples/showBMP_not_Uno/showBMP_not_Uno.ino +++ b/examples/showBMP_not_Uno/showBMP_not_Uno.ino @@ -6,8 +6,13 @@ // // if you are not using a UNO, you must use Software SPI: // -// install v1.0.1 of the library with the Arduino Library Manager. -// edit the src/SdFatConfig.h file to #define ENABLE_SOFTWARE_SPI_CLASS 1 +// NEW: install v2.x.x library with the Arduino Library Manager +// NEW: edit the src/SdFatConfig.h file to #define SPI_DRIVER_SELECT 2 +// +// OBSOLETE SdFat v1.x.x uses a different system +// OBSOLETE v1.x.x SdFatConfig.h: #define ENABLE_SOFTWARE_SPI_CLASS 1 +// OBSOLETE: SdFatSoftSpi<12, 11, 13> SD; //Bit-Bang on the Shield pins SDFat.h v1 +// OBSOLETE: #define SD_CS 10 // // copy all your BMP files to the root directory on the microSD with your PC // (or another directory) @@ -15,13 +20,15 @@ #include // f.k. for Arduino-1.5.2 #define USE_SDFAT #include // Use the SdFat library -SdFatSoftSpi<12, 11, 13> SD; //Bit-Bang on the Shield pins + +SoftSpiDriver<12, 11, 13> softSpi; //Bit-Bang on the Shield pins SDFat.h v2 +SdFat SD; +#define SD_CS SdSpiConfig(10, DEDICATED_SPI, SD_SCK_MHZ(0), &softSpi) #include // Hardware-specific library #include MCUFRIEND_kbv tft; -#define SD_CS 10 #define NAMEMATCH "" // "" matches any name //#define NAMEMATCH "tiger" // *tiger*.bmp #define PALETTEDEPTH 8 // support 256-colour Palette @@ -258,4 +265,3 @@ uint8_t showBMP(char *nm, int x, int y) bmpFile.close(); return (ret); } -