Inkplate 6MOTION Arduino library compilation error with SdFat

Customer:

I’m trying to compile the Inkplate 6MOTION library from the git repository, but I get a compilation error. The error messages indicate a problem with the SdFat library:

c:\Users\[user]\Documents\Arduino\libraries\InkplateMotion\src\InkplateMotion.cpp:24:14: error: no matching function for call to 'SdFs::SdFs(SPIClass*)'
24 | SdFat sd(&SPI);
| ^
In file included from c:\Users\[user]\Documents\Arduino\libraries\InkplateMotion\src\InkplateMotion.h:25,
 from c:\Users\[user]\Documents\Arduino\libraries\InkplateMotion\src\InkplateMotion.cpp:13:
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:424:7: note: candidate: 'SdFs::SdFs()'
424 | class SdFs : public SdBase {
| ^~~~
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:424:7: note: candidate expects 0 arguments, 1 provided
c:\Users\[user]\Documents\Arduino\libraries\InkplateMotion\src\InkplateMotion.cpp: In member function 'SdFat Inkplate::getSdFat()':
199 | return sd;
| ^~
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:424:7: note: 'SdFs::SdFs(const SdFs&)' is implicitly deleted because the default definition would be ill-formed:
424 | class SdFs : public SdBase {
| ^~~~
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:424:7: error: use of deleted function 'SdBase ::SdBase(const SdBase &)'
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:50:7: note: 'SdBase ::SdBase(const SdBase &)' is implicitly deleted because the default definition would be ill-formed:
50 | class SdBase : public Vol {
| ^~~~~~
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:50:7: error: 'FsVolume::FsVolume(const FsVolume&)' is private within this context
In file included from c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/FsLib/FsFile.h:34,
 from c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/FsLib/FsLib.h:31,
 from c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/SdFat.h:33:
c:\Users\[user]\Documents\Arduino\libraries\SdFat\src/FsLib/FsVolume.h:395:3: note: declared private here
395 | FsVolume(const FsVolume& from);
| ^~~~~~~~
exit status 1
Compilation error: exit status 1

Is there a way to solve this?

Attachment omitted in migration: image.png

Originally submitted via email support on 21 December 2024. Migrated to the forum for community visibility.

Soldered Support:

The issue is with the SdFat library. Try these solutions in order:

  1. Install the SDFat library from here if you don’t already have it: GitHub - SolderedElectronics/Soldered-SdFat-Arduino-Library: Arduino FAT16/FAT32 exFAT Library · GitHub - then try compiling the example again.

  2. If you already have a version of SDFat installed, remove it from Arduino/Libraries, install the version linked above, and try compiling again.

  3. If that still doesn’t work, remove that version of SDFat and install this one instead: https://github.com/SolderedElectronics/Inkplate-6-SDFat-Arduino-Library and try compiling again.

  4. If that still doesn’t work - do you have the Inkplate library installed? This library contains SdFat built in and sometimes the Arduino compiler looks at that one instead. Try uninstalling the Inkplate library, then compile for Inkplate 6MOTION with only the SdFat library installed.

One of these configurations should work.

Soldered Support:

Here’s the correct approach:

  1. Download the library from the dev branch: GitHub - SolderedElectronics/Inkplate_Motion_Arduino_Library at dev · GitHub and install it.

  2. Remove any existing Inkplate library or SDFat library if you have them installed in Arduino.

  3. Try compiling now. If you have further problems, update Arduino to version 2.x.

The SDFat library is included in the Inkplate 6MOTION library in the dev branch, but it has not been merged to main yet.

Customer:

I checked the compilation for the example and it works now. I also looked at the example using ESP32. What firmware is used for the ESP32 in this example?

Soldered Support:

The ESP32 uses AT-Commands firmware which receives commands over SPI. It is sourced from GitHub - espressif/esp-at: AT application for ESP32/ESP32-C2/ESP32-C3/ESP32-C6/ESP8266 · GitHub

The specific build is AT version 3.4.0.0-dev, SDK version v5.0.6 for the ESP32C3 model.

The Inkplate Motion library contains code that sends AT Commands to the ESP32 and receives and decodes the data. On Inkplate 6MOTION, the ESP32 handles Wi-Fi connectivity.