Go Down

Topic: I2C LCD Failure to compile (Read 64 times) previous topic - next topic

Good evening, this is my first post so please forgive any protocol mistakes.

I have a Funduino IC2 LCD interface and display and would like to get it working. I have used I2C scanner and it reports a device at 0x27, which I believe is correct. I have tried various libraries over the last few days all of which fail to compile. I believe I have installed the library in the correct place as it can be seen when I try to "include". I have used two Unos but get the same error. I think you can see my IDE version, board type etc. below.
I have removed all Arduino files and uninstalled the system and had a general clean up. I have now reinstalled my IDE fresh and new.
Help with this problem would be greatly appreciated.
Best Regards




#include <Wire.h>
#include <FastIO.h>
#include <I2CIO.h>
#include <LCD.h>
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>
#include <LiquidCrystal_I2C_ByVac.h>
#include <LiquidCrystal_SR.h>
#include <LiquidCrystal_SR1W.h>
#include <LiquidCrystal_SR2W.h>
#include <LiquidCrystal_SR3W.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Arduino: 1.6.3 (Windows 7), Board: "Arduino Uno"

Build options changed, rebuilding all

C:\Users\Peter\Arduino Sketches and Data\libraries\fmalpartida-new-liquidcrystal-67c63469f5ed\I2CIO.cpp:54:3: error: 'Wire' does not name a type

   Wire.beginTransmission(DisplayI2CAddress);

   ^

C:\Users\Peter\Arduino Sketches and Data\libraries\fmalpartida-new-liquidcrystal-67c63469f5ed\I2CIO.cpp:55:3: error: 'error' does not name a type

   error = Wire.endTransmission();

   ^

C:\Users\Peter\Arduino Sketches and Data\libraries\fmalpartida-new-liquidcrystal-67c63469f5ed\I2CIO.cpp:56:3: error: expected unqualified-id before 'if'

   if (error==0){

   ^

C:\Users\Peter\Arduino Sketches and Data\libraries\fmalpartida-new-liquidcrystal-67c63469f5ed\I2CIO.cpp:59:3: error: expected unqualified-id before 'else'

   else //Some error occured

   ^

C:\Users\Peter\Arduino Sketches and Data\libraries\fmalpartida-new-liquidcrystal-67c63469f5ed\I2CIO.cpp:63:1: error: expected declaration before '}' token

 }

 ^

Error compiling.

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

floresta

First of all - put your code into a code block so it will be rendered properly by the forum software.

To find out how to do that take a look at the sticky post titled How to use this forum - please read.


Also - Use the search box at the upper right to find out what others have done to solve your problem.  Search for the terms I2C LCD.  The bottom line is that you have to select and properly install an appropriate library (the one written by 'fm' is currently the one that is most recommended) and you have to get rid of all the others so there's no interaction.

Don

Thank you Don for your prompt rely.
Could I just confirm that the library that is shown (fmalpartida) in the error coding is not the one that you are recommending (fm). I wonder how I can confirm which version I need. I have been browsing this forum for just over two days on my phone, pc etc. and have done all that I can find the answer and the solution I have so far is the one shown.
I really do appreciate the help given by the forum and will endeavour to put code etc. in the right place next time. Thanks.

floresta

To tell you the truth I did not go to the trouble to try and pick out the code and the error messages from your original post.  It really isn't worth the time and effort because the forum software will sometimes change the information.  Please follow the link I provided earlier and scroll down to item #7.

I do not know which is the latest version of the New LiquidCrystal library but 'fm' and 'fmalpartida' both refer to the same individual, Francisco Malpartida, and the same library.  As stated somewhere in the documentation for that library you must remove all of your other I2C libraries and references to them.

Don

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy