Skip to main content
deleted 12 characters in body
Source Link
Majenko
  • 105.9k
  • 5
  • 82
  • 139

You need to:

  1. Create the folder ~/sketchbookArduino/libraries/MyLibrary
  2. Place the library files in there named as:
    • ~/sketchbookArduino/libraries/MyLibrary/MyLibrary.h
    • ~/sketchbookArduino/libraries/MyLibrary/MyLibrary.cpp
  3. Restart the IDE if it is running
  4. Use #include <MyLibrary.h> in your sketch

This is assuming your sketchbook is set to ~/sketchbookArduino - 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.

You need to:

  1. Create the folder ~/sketchbook/libraries/MyLibrary
  2. Place the library files in there named as:
    • ~/sketchbook/libraries/MyLibrary/MyLibrary.h
    • ~/sketchbook/libraries/MyLibrary/MyLibrary.cpp
  3. Restart the IDE if it is running
  4. Use #include <MyLibrary.h> in your sketch

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

Note that in Linux capitalisation is important.

You need to:

  1. Create the folder ~/Arduino/libraries/MyLibrary
  2. Place the library files in there named as:
    • ~/Arduino/libraries/MyLibrary/MyLibrary.h
    • ~/Arduino/libraries/MyLibrary/MyLibrary.cpp
  3. Restart the IDE if it is running
  4. Use #include <MyLibrary.h> 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.

Source Link
Majenko
  • 105.9k
  • 5
  • 82
  • 139

You need to:

  1. Create the folder ~/sketchbook/libraries/MyLibrary
  2. Place the library files in there named as:
    • ~/sketchbook/libraries/MyLibrary/MyLibrary.h
    • ~/sketchbook/libraries/MyLibrary/MyLibrary.cpp
  3. Restart the IDE if it is running
  4. Use #include <MyLibrary.h> in your sketch

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

Note that in Linux capitalisation is important.