I'm trying to start with the SainSmart 4x20 serial LCD, and copied the library to the Arduino library:
enter image description here
So LiquidCrystal_I2C.h
is included. But when I try to compile an example sketch it says
Arduino: 1.7.0 (Windows 7), Board: "Arduino Uno"
HelloWorld_i2c.pde:2:31: fatal error: LiquidCrystal_I2C.h: No such file or directory
compilation terminated.
Error compiling.
Any ideas how to fix this?
-
There is no such thing as Arduino 1.7.0. At the time of writing, the latest Arduino IDE is 1.6.3 arduino.cc/en/Main/SoftwareFederico Fissore– Federico Fissore2015年04月16日 14:30:28 +00:00Commented Apr 16, 2015 at 14:30
-
It may be the 'Arduino.org' ripoff version. Test the same sketch in the Official Arduino IDE, the one linked by @FedericoFissorePaolo Zanchi– Paolo Zanchi2015年04月16日 14:51:01 +00:00Commented Apr 16, 2015 at 14:51
-
Please, accept your owm answer to close this question.user31481– user314812017年11月08日 06:37:11 +00:00Commented Nov 8, 2017 at 6:37
2 Answers 2
I copied the SainSmart library to the IDE's library folder, not noticing that there was already a folder named "LiquidCrystal". Apparently the files added to the existing folder are being ignored.
Renaming the SainSmart library before adding it solves the problem.
There is not enough info to give a specific answer so I will give some troubleshooting tips:
- First make sure at the top of your code you have: #include <LiquidCrystal_I2C.h> - with angle brackets
- You may also need the Wire header file: #include <Wire.h> - with angle brackets
- Make sure you Include Serial
- Make sure there are no extra folders in the library for example there should be a folder called liquidcrystal inside the liquidcrystal folder
- If all fails copy the code from the header file make a new file in the IDE paste it in there and call it LiquidCrystal_I2C.h
Hope one of those solves your problem.