Hello
I´m new to Arduino and I bought Arduino uno v2 and I have display 1602 vith I2C bus (so the pins are 5V, GND, SDA, SCL). The problem is that everything I can see are black boxes in one line. Can you tell me what libraries do I need to have? I added LiquidCrystal and Wire. I also tried to add LiquidCrystal-I2C but no matter what I do it never finishes the compilation because of the collision with Wire library (at least I think so). When I try to deal only with LiquidCrystal-I2C I have no success. I have no potentiometer on the back of the display and unfortunately I neither have external potentiometer. Any advice? Thank you.
You need to remove the original LiquidCrystal library and install the fmalpartida one.
You then need to run the LCDguesser script to determine your constructor.
If you have a display with an I2C interface, it already contains the contrast potentiometer. You need to post a link to the display you have if you want an explanation of that. If you are seeing the black boxes, it is probably already adjusted near to correctly.
Thank you for your advice but the problem remains unsolved. When I try to load fmalpartida and try to compile it without any code It´s not working. There is screenshot
I'm afraid there are a few problems here.
One is that your code - insofar as I can see it - does nothing (even if it did compile), so your display would be showing exactly what it would be expected to.
The second is that it is a load of nonsense! Useless "include"s.
What you need to do (and the way I generally do things) is to start with known working code - run the "guesser" sketch that I cited (indirectly). Once you have demonstrated operation of the display, you can use the initialisation parts of the "guesser" sketch to ready your display and insert the correct "descriptor" that it gives you.
I am sorry I probably don´t understand you. Of course I know that it won´t show me anything without the code but when it´s unable to compile without the code it definitely won´t be able to compile with it. I tried code i2cLCDguesser (without "include"s) and still have a lots of errors. Something like this:
Arduino: 1.7.7 (Windows 7), Board: "Arduino Uno"
sketch_oct11c.ino:99:2: error: #error i2dLCDguesser requires using fmalpartida LiquidCrystal replacement library
In file included from sketch_oct11c.ino:93:0:
C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:80:16: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
virtual void write(uint8_t);
^
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:223,
from sketch_oct11c.ino:1:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:48:20: error: overriding 'virtual size_t Print::write(uint8_t)'
virtual size_t write(uint8_t) = 0;
^
sketch_oct11c.ino:336:13: error: 'POSITIVE' was not declared in this scope
sketch_oct11c.ino:343:36: error: 'POSITIVE' was not declared in this scope
sketch_oct11c.ino:344:36: error: 'NEGATIVE' was not declared in this scope
sketch_oct11c.ino:345:36: error: 'NEGATIVE' was not declared in this scope
sketch_oct11c.ino:346:36: error: 'NEGATIVE' was not declared in this scope
sketch_oct11c.ino:347:36: error: 'POSITIVE' was not declared in this scope
sketch_oct11c.ino:348:36: error: 'POSITIVE' was not declared in this scope
sketch_oct11c.ino: In function 'int guessconfig(uint8_t)':
sketch_oct11c.ino:372:48: error: 'POSITIVE' was not declared in this scope
sketch_oct11c.ino:388:26: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(uint8_t&, uint8_t&, uint8_t&, uint8_t&, uint8_t&, uint8_t&, uint8_t&, uint8_t&, uint8_t&, int&)'
sketch_oct11c.ino:388:26: note: candidates are:
In file included from sketch_oct11c.ino:93:0:
C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:56: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:\Program Files (x86)\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:56:3: note: candidate expects 3 arguments, 10 provided
C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:54:7: note: LiquidCrystal_I2C::LiquidCrystal_I2C(const LiquidCrystal_I2C&)
class LiquidCrystal_I2C : public Print {
^
C:\Program Files (x86)\Arduino\libraries\LiquidCrystal_I2C/LiquidCrystal_I2C.h:54:7: note: candidate expects 1 argument, 10 provided
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Almost certainly you have not correctly installed the fmalpartida library - or failed to remove (not rename) the original from the IDE.