Arduino-LiquidCrystal-I2C-library icon indicating copy to clipboard operation
Arduino-LiquidCrystal-I2C-library copied to clipboard

Does not print more than one character.

Open Avamander opened this issue 8 years ago • 15 comments

This library only prints the first letter of the string that had been passed to the .write(string) function. (i2c controller is pcf8574ae 44qhe knm95q12)

Avamander avatar Oct 26 '15 19:10 Avamander

Have the same problem here. Arduino Version 1.6.6

AnDann avatar Nov 07 '15 15:11 AnDann

Same issue on Arduino 1.6.6. None of the lcd.* functions seem to make a difference.

Somnitec avatar Nov 26 '15 19:11 Somnitec

Hello guys in LiquidCrystal_I2C.cpp just add a line "return 1;" after 203. The procedure will look this way:

inline size_t LiquidCrystal_I2C::write(uint8_t value) { send(value, Rs); return 1; }

Compile, and it will work fine! The new Arduino IDE checks the return value of this proc and it has to be 1 to work fine.

pprovaz avatar Dec 27 '15 12:12 pprovaz

Hmmm.....same here. I already checked line 203 and (on my fresh re-downloaded LC-i2c-lib) it already is return = 1.

Any other suggestions?

Cysign avatar Dec 29 '15 13:12 Cysign

Be sure to remove all other versions from your folders. New Arduino IDE may not use the version in the libraries folder, it uses first version of the same named file it finds, for example in your sketch folder. It may give you a note in the log, what version does it use.

If this does not help, make this test: Download the file from here or copy all the lines from here and paste them over your file. Do the same for LiquidCrystal_I2C.h. Insert the line 203 as described above. I did this yesterday and it works.

pprovaz avatar Dec 29 '15 14:12 pprovaz

Well, can you tell me where the logfile is located or what it's name is, please? (Windows system)

I figured out I have had left a copy of the old files still in the libraries folder (one folder called LiquidCrystal-I2C and another one LiquidCrystal - noe deleted the latter one). Then I ensured that the other one has the changes on line 203 (return = 1). To make sure it is identical with the library I copied the content for both, the cpp and h files. Then I restarted the IDE but I still do only get the first letter of my string on the display.

Cysign avatar Dec 29 '15 14:12 Cysign

If you used the libraries auto update (built in the new Arduino IDE), one library copy is also in your Documents\Arduino folder.

If there are more versions, it will notify you in the log, located under the code window in Aduino IDE. It is the black area near the bottom of the screen in Arduino IDE.

Also double check, if this section looks really this way: inline size_t LiquidCrystal_I2C::write(uint8_t value) { send(value, Rs); return 1; }

I have tested this in 1.6.7. Arduino IDE

pprovaz avatar Dec 29 '15 15:12 pprovaz

That's it! Thanks!

A copy has been in C:\Users\Documents\Arduino\libraries

Can I disable using this folder? I usually prefer having all neccessary files in the program folder....it's easier to backup if all belongs to one place!

Cysign avatar Dec 29 '15 15:12 Cysign

Perfect!

Not sure about disabling the folder. This path is defined in File -> Preferences as a sketchbook location. You may try to leave it blank, not sure what happens.

pprovaz avatar Dec 29 '15 17:12 pprovaz

If you leave it blank or fill in an incorrect path, it resets to deafult. I just filled in a subfolder in ma IDE and now I'm just moving all new downloaded updates to my library-folder and overwrite the old files. That's more comfortable than always searching the default folder. But I'd prefer them to ask to overwrite the old libs and create a backup of the old files when there's an update available... Still much potential for improvements on the ArduinoIDE.

Thanks for your help :)

Cysign avatar Dec 30 '15 06:12 Cysign

Ok, then I would point it to the library folder of your Arduino installation, or your usual sketch folder.

pprovaz avatar Dec 30 '15 14:12 pprovaz

Guys...change the clock to Internal 16MHz ;)

PramodKarunarathne avatar Jan 07 '17 14:01 PramodKarunarathne

To make a library work?

Avamander avatar Jan 07 '17 14:01 Avamander

Thank you very much

pprovaz #

Your suggestion works very well Georg

dous56 avatar Nov 22 '17 20:11 dous56

Thank you !!

Also, your suggestion works very well!

Jose

Biohidraulica avatar Jul 03 '18 22:07 Biohidraulica