Customer:
I just started working with Inkplate 10, and I expected to read from files on the SD card once a day to display their contents. I thought I could use the sequence of sdCardInit() followed by sdCardSleep() every day, repeating the sequence the following day. In my testing, the following sdCardInit() never works. Is there some other pin setting I need to manually configure to ensure repeat uses of init/sleep on the SD card?
Originally submitted via email support on 29 December 2024. Migrated to the forum for community visibility.
Soldered Support:
Check the example at https://github.com/SolderedElectronics/Inkplate-Arduino-library/blob/master/examples/Inkplate10/Advanced/SD/Inkplate10_SD_Pictures/Inkplate10_SD_Pictures.ino
There shouldn’t be any other setting which needs to be changed. If SDCard init never works, you can check if the SD card gets power with a voltmeter, but it likely does because this gets tested in production.
Your SD card might be too high capacity to be used with ESP32 or not formatted correctly for ESP32. Try the official SD card formatter: SD Memory Card Formatter for Windows/Mac - SD Association. The card should be formatted to FAT32. Some SD cards work only after using this official SD Card tool.
Try the example linked, unchanged (and copy the bitmap files to the SD card as well which are in the example) to see if you can get the SD card working, and then we’ll see from there.
Also, try updating the Inkplate library to the latest version in case you haven’t already.
This is most likely a software issue.
Customer:
The example works, and I’m very grateful for the examples in the library. For my application, I was hoping to access the SD card once daily, then put it to sleep to save power until accessed the next day. Should I expect the alternating sequence of display.sdCardInit() (at the start of a loop) and display.sdCardSleep() (at the end) to work?
Soldered Support:
Glad to hear it works! The sequence in the example can be used as-is. I would personally take the example and wrap it into functions to use in my own sketch.
To sleep Inkplate for a certain number of hours to save power, check out the sleep example. These two lines of code basically put Inkplate into deep sleep:
esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); // Activate wake-up timer -- wake up after 20s here
esp_deep_sleep_start(); // Put ESP32 into deep sleep. Program stops here.
If you’re powering entirely on battery, turning off the power indicator LED will reduce power consumption, allowing you to get the lowest possible power usage during sleep (it’s turned off via a switch in the back).