This guide shows how to setup and use the LCD with keypad edition of onebeartoe Photorama, for Raspberry Pi. The application is run from the command line. A menu system is displayed on the LCD. The keypad is used to navigate the menu system.
Under the hood, the application uses Java to communicate with the LCD and keypad using I2C. The Raspberry Pi camera is controlled with system calls to raspistill.
This project assumes you have access to a working Raspberry Pi with camera module.
This project also requires an LCD with keypad kit from Adafruit.
Use this Rasperry Pi and camera module quick start guide to get familiar with the hardware.
Adafruit has a great https://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi. Follow those instructions and pick up here, once it is working on the Raspberry Pi.
This project requires Java 8. Fortunately, the latest release of Raspbian comes with a suitable JRE (Java Runtime Environment) for this project.
If the latest version of Java is not installe don the Raspberry Pi, then use the following commands to obtain it.
sudo apt-get update sudo apt-get upgrade sudo apt-get install oracle-java8-jdk
This project is written in Java and is deployed as an executable JAR. It is run from the command line.Download the Application
Copy the JAR to the Raspberry Pi and cd to the directory where the JAR was copied.
Run the application by issuing the following command, in the same directory where the JAR file was copied. This will bring up the top level menu for the application, on the LCD.
This LCD with keypad version of Photorama features snapshot and time lapse modes.
The up, left, right, and select keys are used to move between modes, and to start and stop the individual modes.
In snapshot mode, the select button is used to take a single snapshot. In time lapse mode, selecting Minute, Second, or Hour starts the time lapse at the current frequency. The snapshot frequency is adjusted with the left and right keys.
The up key is used to 'go up' a level in the menu system.
The source is available on Github:
Development builds are available on Cloudbees: https://onebeartoe.ci.cloudbees.com/job/photorama/
Here is the state diagram used to build the menu system.
While working on this version of the Photorama, I did not always have access to a Raspberry Pi. The model, view, control pattern was used to separate the application logic from the user interface. A separate desktop (Javafx) application was created to allow working on the menu system logic, when a Raspberry Pi was not on hand.
As a result, there is a matching application with a graphical user interface (GUI). It currently uses a mock (do nothing) camera implementation. With a little work, the GUI app can be modified to function with a USB camera on PC or laptop operating systems. This is an exercise left for the reader.