Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

LCD library #13

Closed
Ropsch opened this issue Dec 5, 2012 · 9 comments
Closed

LCD library #13

Ropsch opened this issue Dec 5, 2012 · 9 comments
Assignees
Milestone

Comments

@Ropsch
Copy link

Ropsch commented Dec 5, 2012

Robert, Thanks for this great library, it is a major help for my school project!

I just got the LCD library working by porting an existing WiringPi based C test project.
However, the lcdClear() method corrupts the display every time, and occasionally I get a messed up display after writing the very first character after lcdInit().
Maybe it's a timing issue, or my display is on the borderline of its specs.

Has anyone else tried using the LCD class?

Thank you a lot, keep up the good work!

@savageautomate
Copy link
Member

I have not had any other reports of users attempting the LCD. What LCD device/kit are you using? I would like to try it out first hand. Thanks, Robert

@Ropsch
Copy link
Author

Ropsch commented Dec 8, 2012

Hello Robert,

Thanks for your reply.
I use a cheapo 16x2 digit display in 4 bit mode.
My config involves the SPI pins, but I am not aware of SPI being activated
on my system. Also the same config works fine in a C program.
The problem occurs when I use lcdClear() and lcdHome() like below. I use a
workaround by overwriting characters with spaces, which always works.

if (Gpio.wiringPiSetup () == -1) return;
lcdID = Lcd.lcdInit (2, 16, 4, 14, 6, 11, 10, 13, 12, 0, 0, 0, 0);
if (lcdID == (-1)) return;
Lcd.lcdClear(lcdID);
Lcd.lcdHome(lcdID);
Lcd.lcdPuts (lcdID, "Hello World");

This has two possible outputs on the display, by a chance of about 50-50.
1.: "o World" - note the missing first part. After this everything works
just fine.
2.: a bunch of random weird characters. lcdPuts() outputs random stuff
from here on.

I hope this helps somewhat.
Cheers!

2012/12/8 Robert Savage notifications@github.com

I have not had any other reports of users attempting the LCD. What LCD
device/kit are you using? I would like to try it out first hand. Thanks,
Robert


Reply to this email directly or view it on GitHubhttps://github.com//issues/13#issuecomment-11161493.

@savageautomate
Copy link
Member

I need to acquire a LCD board to test/fix this issue.

@savageautomate
Copy link
Member

Ordered hardware; waiting on LCD devices to arrive.

@johngamarra
Copy link

Hi, I already seen the same problem with LCDs Is this issue going to be fixed soon?

@savageautomate
Copy link
Member

Testing this today.

@ghost ghost assigned savageautomate Feb 9, 2013
@savageautomate
Copy link
Member

OK, I tested this today using this 4-bit LCD kit:
http://mypishop.com/Read%20Your%20Pi%20!.html

All the functions seem to be working correctly for me (home, clear and puts). I worked on the LCD implementation a few weeks back and added a Pi4J device abstraction layer as well.

Check out these sample projects:

This sample code uses the WiringPi JNI wrapper functions:
https://github.com/Pi4J/pi4j/blob/develop/pi4j-example/src/main/java/WiringPiLcdExample.java

This sample code uses the new Pi4J LCD device abstraction:
https://github.com/Pi4J/pi4j/blob/develop/pi4j-example/src/main/java/LcdExample.java

These examples are based on the latest 0.0.5-SNAPSHOT version of Pi4J.
Please test with the latest build and let me know if there is still a problem.

Thanks, Robert

@johngamarra
Copy link

tested this week with a 4x20 LCD in 8-bit mode using WiringPi wiring, no issues so far...

@savageautomate
Copy link
Member

That's great news!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants