40 x 2 LCD Display not working

56 views
Skip to first unread message

K Chand

unread,
Jun 10, 2017, 12:57:38 PM6/10/17
to Pi4J
Hi
I am trying to use 40 x 2 LCD, but its not working I am getting below error: 


Exception in thread "main" java.lang.RuntimeException: Invalid LCD handle returned from wiringPi: -1
        at com.pi4j.component.lcd.impl.GpioLcdDisplay.<init>(GpioLcdDisplay.java:69)
        at org.kcs.gps.main.ClockSynchronizerApp.initScreen(ClockSynchronizerApp.java:83)
        at org.kcs.gps.main.ClockSynchronizerApp.<init>(ClockSynchronizerApp.java:69)
        at org.kcs.gps.main.ClockSynchronizerApp.main(ClockSynchronizerApp.java:56)

Any IDEA ??

Thanks

Message has been deleted

WebEder Eder

unread,
Mar 6, 2018, 3:04:12 PM3/6/18
to Pi4J

I'm with the same problem you. Did you get any improvement on your tests yet?

Steven F. Le Brun

unread,
Apr 8, 2018, 10:44:57 PM4/8/18
to Pi4J
Are you connecting an LCD display directly to the Raspberry Pi GPIO or are you using an I2C LCD display that has its I2C Chip connected to the Raspberry Pi?

I have an I2C 16x2 LCD hat and found that the examples did not work because either they ignored the I2C interface or used the I2C interface and ignored the actual LCD code.

I ended up writing my own class to communicate with the MCP 23017 chip using the I2C protocol with my own LCD IMPL to communicate with the LCD display through the
MCP 23017 chip.
Reply all
Reply to author
Forward
0 new messages