Add much-needed SdFat library into examples

This commit is contained in:
David Zovko 2020-07-15 15:11:47 +02:00
parent 0e66078790
commit df76254daa
2 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,9 @@
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it: Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/ https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
To work with SD card on Inkplate, you will need to add one extra library.
Download and install it from here: https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library
You can open .bmp files that have color depth of 1 bit (monochrome bitmap) and You can open .bmp files that have color depth of 1 bit (monochrome bitmap) and
24 bit AND have resoluton smaller than 800x600 or otherwise it won't fit on screen. 24 bit AND have resoluton smaller than 800x600 or otherwise it won't fit on screen.
@ -18,6 +21,7 @@
*/ */
#include "Inkplate.h" //Include Inkplate library to the sketch #include "Inkplate.h" //Include Inkplate library to the sketch
#include "SdFat.h" //Include library for SD card
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome) Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
SdFile file; //Create SdFile object used for accessing files on SD card SdFile file; //Create SdFile object used for accessing files on SD card

View File

@ -1,11 +1,14 @@
/* /*
5_Inkplate_SD_TXT example for e-radionica.com Inkplate 6 6_Inkplate_SD_TXT example for e-radionica.com Inkplate 6
For this example you will need only a micro USB cable, Inkplate 6 and a SD card For this example you will need only a micro USB cable, Inkplate 6 and a SD card
loaded with text.txt file that can be found inside folder of this example. loaded with text.txt file that can be found inside folder of this example.
Select "Inkplate 6(ESP32)" from Tools -> Board menu. Select "Inkplate 6(ESP32)" from Tools -> Board menu.
Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it: Don't have "Inkplate 6(ESP32)" option? Follow our tutorial and add it:
https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/ https://e-radionica.com/en/blog/add-inkplate-6-to-arduino-ide/
To work with SD card on Inkplate, you will need to add one extra library.
Download and install it from here: https://github.com/e-radionicacom/Inkplate-6-SDFat-Arduino-Library
You can open your own .txt file, but in order to this example works properly it should You can open your own .txt file, but in order to this example works properly it should
not have more than 200 chars and you should name it text.txt not have more than 200 chars and you should name it text.txt
@ -17,6 +20,7 @@
*/ */
#include "Inkplate.h" //Include Inkplate library to the sketch #include "Inkplate.h" //Include Inkplate library to the sketch
#include "SdFat.h" //Include library for SD card
Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome) Inkplate display(INKPLATE_1BIT); //Create an object on Inkplate library and also set library into 1 Bit mode (Monochrome)
SdFile file; //Create SdFile object used for accessing files on SD card SdFile file; //Create SdFile object used for accessing files on SD card