Adding LCD.h Library - cant add it??

I've tried and tried. I cant seem to get the LCD.h library loaded. I've been able to get wire.h, IRremote.h, servo.h but cannot get LCD.h. (using sketch\include library)

here's my code I'm starting with...

#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <IRremote.h>
#include <LCD.h>

the servo.h, wire.h liquidCrystal_I2C.h show up orange but IRremote.h does not. what does that mean?

Here's my error

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

platform.ino:21:17: fatal error: LCD.h: No such file or directory

#include <LCD.h>

^

compilation terminated.

Multiple libraries were found for "IRremote.h"
Used: C:\Users\Primary\Documents\Arduino\libraries\IRremote
Not used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote
exit status 1
Error compiling for board Arduino/Genuino Uno.

The attachment shows in window explorer where I have the library files installed.

what am I doing wrong?

LCD.h and LCD.cpp should be inside a directory named LCD, just like the IRremote library is in the IRremote directory and the LiquidCrystal_I2C library is in the LiquidCrystal_I2C directory. Move them and re-start the IDE.

You should probably delete all the random files that are cluttering up your 'libraries' directory. Each library should be inside its own directory.

Stewart:
the servo.h, wire.h liquidCrystal_I2C.h show up orange but IRremote.h does not. what does that mean?

Absolutely nothing. servo and liquidCrystal_I2C happen to be defined as keywords in the keywords.txt of one of your installed libraries and IRremote is not. This makes no functional difference, it only affects the color of the words in the IDE.

thanks that suggestion helped as far as getting past the LCD.h not found.

However, after the next compile the error said I was missing a wire.h library and had multiple libraries and the LCD.h library (folder named LCD.h) were not used.

I'm off to find the wire.h library EDIT>>> Looks like wire.h is already included under sketch\include libraries. So why the error?

why do multiple libraries cause a problem?
why wouldnt LCD.h be used?

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

fatal error: ../Wire/Wire.h: No such file or directory

#include <../Wire/Wire.h>

^

compilation terminated.

Multiple libraries were found for "LiquidCrystal_I2C.h"
Used: C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C
Not used: C:\Users\Primary\Documents\Arduino\libraries\LCD
Multiple libraries were found for "IRremote.h"
Used: C:\Users\Primary\Documents\Arduino\libraries\IRremote
Not used: C:\Users\Primary\Documents\Arduino\libraries\LCD
Not used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote
exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Stewart:
Looks like wire.h is already included under sketch\include libraries. So why the error?

Because unfortunately the person who wrote that library made the assumption that the Wire library would be in a specific location relative to the LiquidCrystal_I2C library. The Wire library will never be in that location so the library is broken.

Luckily the fix is easy:
Open the file containing the line:

 #include <../Wire/Wire.h>

change that line to:

 #include <Wire.h>

Save the file

You seem to have not posted the full error output so I can't tell you exactly which file you need to open, just read the output carefully and it will tell you the location of the file and the line number.

Stewart:
why wouldnt LCD.h be used?

LCD.h was used. The LCD library you created wasn't used. There are two files named LCD.h in your libraries. One is in C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C, the other is in C:\Users\Primary\Documents\Arduino\libraries\LCD. Since you had previously included LiquidCrystal_I2C.h the former gets include precedence. Since this may not always be the desired behavior the IDE prints this helpful message. You will notice the same happened with IRremote.h. For some strange reason you have also placed that file in C:\Users\Primary\Documents\Arduino\libraries\LCD. There actually is no library called LCD, the files LCD.h and LCD.cpp are part of the LiquidCrystal_I2C. What seems to have happened is you attempted to install multiple libraries by dumping all their files in the root of C:\Users\Primary\Documents\Arduino\libraries, which doesn't work, all libraries must be in a subfolder of C:\Users\Primary\Documents\Arduino\libraries. Then you took all those files from the root of C:\Users\Primary\Documents\Arduino\libraries and dumped them in a folder named LCD, which most likely has no purpose.

Ok, getting clearer. thanks. Now I'm still down to the /wire/wire.h error. Is that line in the I2CIO.cpp file? and if so, how do I modify the I2CIO.cpp file? or should I be modifying it? Do I need an appropriate app to open it?

EDIT >>>> I found that notepad in MS windows opened the file. I edited the line and now I no longer have the error (but new errors follow of course!)

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Users\Primary\Documents\Arduino\libraries\LCD\I2CIO.cpp:35:26: fatal error: ../Wire/Wire.h: No such file or directory

#include <../Wire/Wire.h>

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I think I got some good answers in this thread. As I'm moving along in this code, i'm coming across a lot of other errors every time I compile. Now there are issues with the Liquid Crystal Display functions. errors below...

My initial goal is to get this stewart platform to work by incorporating an IMU. I dont need the IR controls and dont need the LCD. I'll start a new thread with requests on how to delete the IR controls and add in the IMU in their place - as well as where to comment out the LCD - so I can go on to learn how to incorporate it into the design later.

thanks.

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

platform:73: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'

LiquidCrystal_I2C lcd(I2C_ADDR, En, Rw, Rs, D4,D5,D6,D7);

^

C:\Users\Primary\Documents\Arduino\IRLCD Stewart Platform\RotaryStewartPlatform-master\src_arduino_code\platform\platform.ino:73:56: note: candidates are:

In file included from C:\Users\Primary\Documents\Arduino\IRLCD Stewart Platform\RotaryStewartPlatform-master\src_arduino_code\platform\platform.ino:19:0:

C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:57:3: note: LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t, uint8_t, uint8_t)

LiquidCrystal_I2C(uint8_t lcd_Addr,uint8_t lcd_cols,uint8_t lcd_rows);

^

C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:57:3: note: candidate expects 3 arguments, 8 provided

C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: constexpr LiquidCrystal_I2C::LiquidCrystal_I2C(const LiquidCrystal_I2C&)

class LiquidCrystal_I2C : public Print {

^

C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: candidate expects 1 argument, 8 provided

C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: constexpr LiquidCrystal_I2C::LiquidCrystal_I2C(LiquidCrystal_I2C&&)

C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:55:7: note: candidate expects 1 argument, 8 provided

C:\Users\Primary\Documents\Arduino\IRLCD Stewart Platform\RotaryStewartPlatform-master\src_arduino_code\platform\platform.ino: In function 'void setup()':

platform:141: error: 'class LiquidCrystal_I2C' has no member named 'setBacklightPin'

lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);

^

exit status 1
no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

There are multiple different libraries named LiquidCrystal_I2C and also multiple version of each of those different libraries. I suspect the code you copied for your sketch is intended to use a different LiquidCrystal_I2C library or a different version of the library you're using.

Please post a link to where you found the code you're using. Use the chain links icon on the toolbar to make the URL clickable.

Please post a link to where you downloaded the LiquidCrystal_I2C library from.

Link to the libraries for this

I hope that worked..

Try this:

  • Delete C:\Users\Primary\Documents\Arduino\libraries\LiquidCrystal_I2C. Please be very careful when deleting files on your computer. When in doubt back up!
  • Delete C:\Users\Primary\Documents\Arduino\libraries\LCD
  • Delete C:\Users\Primary\Documents\Arduino\libraries\IRremote
  • Download https://github.com/ThomasKNR/RotaryStewartPlatform/archive/master.zip
  • Unzip the downloaded file
  • Copy the folders LiquidCrystal and IRremote from RotaryStewartPlatform-master\src_arduino_code\libraries to C:\Users\Primary\Documents\Arduino\libraries
  • Open the file RotaryStewartPlatform-master\src_arduino_code\platform.ino
  • The Arduino IDE will ask if you want to move the file to a folder named platform, confirm
  • Sketch > Compile/verify

Worked for me.

Thanks Pert - Followed your directions and I got the program to compile. I did have the ...#include <../Wire/Wire.h> error on compiling again, but fixed it.

I need to get a LCD.

As far as the IR remote - do you thing it could be any IR remote laying around or a specific type? I'm going to dive into the documentation/readme now to see if anything is called out regarding the Remote control.

Not sure what happened to the last post - I cant edit or delete it. I'm going to continue the hardware questions under another thread. thanks again for the help.