Tuesday, April 28, 2015

JAVA LCD 1602 with Raspberry Pi

Hello there, time for one more lesson review.

Lesson 14 is different from all the previous exercises. First the there is no C code like in all the other lessons, instead the kit comes with a Python example of an LCD menu for Raspberry Pi based on the project PiLcdMenu. Second, the kit comes with the LCD display only. It comes without the Adafruit Keypad Kit which is the Adafruit board that allows user interaction. So, without buttons there is only one thing you can do with that code, execute it and watch the first message on the display.

While that looks interesting, there is though a more interesting Java example to play with this LCD1602 component. Check out this nice post by Marcus. He is using the WiringPi Lcd library of the Pi4j project. The Ex14_Lcd1602 its basically based on Marcus example.

The next item in my TODO list is to translate the RaspberryPiLcdMenu into JAVA. I could not find any similar menu project already in JAVA, so I guess I will do it when I have some time later on. I will have to buy the keypad kit and then play with this lesson a little bit more. 

For now, the code in Ex14_Lcd1602 works perfectly fine and at least it is running a very inefficient LCD  clock display. 

For full details about how to set up your Raspberry Pi and how to run these exercises please check out my old post Raspberri Pi with Pi4j and Junit testing mockups. Or leave me a comment if you have any issue or question.

Thanks for reading, 
Keep on hacking, 

Posted by Marc Andreu.

No comments: