Hi @Farticus. The problem is that this library is not formatted as an Arduino Library.
If you want to give it a try, it can be installed with simple adjustment to the file structure. I didn't look to see whether it is compatible with Arduino, but if you want to give it a try I'll provide instructions you can follow to install that library:
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Take note of the path shown in the "Sketchbook location" field of the dialog.
- Click the "CANCEL" button.
The "Preferences" dialog will close. - Click the following link to open the library's GitHub repository homepage in your web browser:
https://github.com/noassemblyrequired/esp32-ds3231 - Click the "Code ▾" button you see on that page.
- Select Download ZIP from the menu.
A download of the ZIP file of the library will start. - Wait for the download to finish.
- Extract the downloaded file.
- Move the
ds3231.hfile from theincludesubfolder of the extracted folder to the root of the extracted folder. - Rename the
ds3231.cfile that is located the root of the extracted folder tods3231.cpp.
ⓘ This is done because the.cfile extension causes the library source code to be compiled as C programming language, while the.inofiles of your Arduino sketches are compiled as C++. You can use objects from C libraries in a C++ program, but you need to do something special in your sketch code to accomplish that. So I think it is more simple to just rename the source code file with the.cppfile extension so that it will be compiled as C++ instead of C. C++ is a superset of C, so this shouldn't cause any problems. - Copy the extracted folder to the
librariessubfolder of the path you saw in the "Sketchbook location" preference.
The folder structure of the installation must look like this:
(where<Sketchbook location>/ ├── libraries/ │ ├── esp32-ds3231-main/ │ │ ├── ds3231.cpp │ │ ├── ds3231.h │ │ ... │ ... ...<Sketchbook location>is the path from the Sketchbook location" preference) - Select File > Quit (or Arduino IDE > Quit Arduino IDE for macOS users) from the Arduino IDE menus.
All Arduino IDE windows will close. - Start Arduino IDE.