I am trying to get my photon up and running with my LCD display + I2C backpack (both from adafruit). My current situation does not allow me to use log onto the internet with the photon so I can’t use the online IDE. I am able to compile and flash the blink program with DFU mode and I am running into an error when trying to implement the adafruit LCD lib.
particle compile photon LiquidCrystal_i2c.ino
Compiling code for photon
attempting to compile firmware
Compile failed. Exiting.
LiquidCrystal_i2c.cpp:6:36: fatal error: Adafruit_LiquidCrystal.h: No such file or directory
make: *** [../build/target/user/platform-6LiquidCrystal_i2c.o] Error 1
make: *** [user] Error 2
I do have the LiquidCrystal.h file in the same folder as the LiquidCrystal_i2c.ino. Screenshots:
Any help is much appreciated!
Try leaving only the files you actually need (one .ino only) and then compile the whole folder, rather than just the file.
What Moors7 said is true, you need to remove all of the unneeded files from the directory. Particle Dev (Atom IDE) doesn’t build the .ino file that is open. It actually builds all of the files in the directory tree on the left side of the window, typically the directory the leftmost tab is contained in.
Edit: I didn’t notice you were editing with Dev and compiling with the CLI. ScruffR’s comment below is the correct answer for the CLI.
Also, you can use Particle Build (Web IDE) for an offline Photon. Use the Verify (checkmark) icon to compile. Then click on the Code icon on the left (the angle brackets), then at the top of the page under Current App there’s a little icon with a cloud and an arrow. Click that and you can download the firmware binary that you can flash over USB using the CLI.
Another contributing factor might be the format of you include statement.
Try avoiding the angled brackets and use double quotes
There is a difference in search path between the two variants which might contribute to the issue.
But most importantly, this will only upload the
.ino file to build
In order to build your project you’d need to do
particle compile photon .
The single dot tells CLI to build the current folder, you could also use the full or relative path in its place, but I find the single dot easier.
It worked! thank you so much