How to install your own library with Arduino IDE 1.8.5? I'm struggling a bit with Arduino language + its IDE not being 100% real C++. I wrote my own I2C library for a sensor but can't get the IDE's compiler to recognise it. I'm using Ubuntu 18.04.

I get no such file or directory for all of these things I've tried:


Include the .h file by absolute and relative path in the .ino code
Put .cpp +  .h files in ~/Arduino/libraries
Put .cpp +  .h files in ~/sketchbook/libraries
Put .cpp +  .h files in ~/sketchbook/libraries/mylibrary
Put .cpp +  .h files in ~/sketchbook/libraries/mylibrary and try to "install" the library in the IDE (Sketch -> Include library -> Manage libraries; it's not listed)


I'm following the official guide here. Any ideas on how to get the compiler to recognise my library?
You need to:


Create the folder ~/Arduino/libraries/MyLibrary
Place the library files in there named as:


~/Arduino/libraries/MyLibrary/MyLibrary.h
~/Arduino/libraries/MyLibrary/MyLibrary.cpp

Restart the IDE if it is running
Use #include &lt;MyLibrary.h&gt; in your sketch


This is assuming your sketchbook is set to ~/Arduino - change that to wherever the sketchbook is set to (check in Preferences for that location).

Note that in Linux capitalisation is important. The filesystem is case sensitive, and the name of your folder should have the same name and capitalisation as the name of your header file.