Arduino.mk how to use the library LiquidCrystal

236 Views Asked by At

How do I point an Arduino makefile to the LiquidCrystal library? The helloworld.ino program is meant to print "Hello World" to a 16-pin LCD.

I already made the program which has the first line:

#include < LiquidCrystal.h >

However, for the LiquidCrystal.h to work, I am not sure how to specify this in the Makefile.

1

There are 1 best solutions below

0
On

the way to include a library in the Arduino makefile if you are using it in a sketch is to write into the makefile the line:

ARDUINO_LIBS = Library1 Library2

where Library1 and Library2 are the libraries that you are using in your sketch (make sure libraries are separated by a space). Note that ARDUINO_LIBS assumes that you are referencing the standard Arduino libraries which for Linux is located in: /usr/share/arduino/libraries

Also, if you are using a library that is not located in the standard Arduino libraries directory, you could make another libraries directory containing your nonstandard Arduino library. Then just use the following line in your makefile:

USER_LIB_PATH = /home/.../libraries