This project contains java JNI driver implementation for 1.3" Inch color 240x240 display hat for raspberry pi. Original product page is here Technical details are here.
- lcd-13-240x240-wiringpi - native driver implementation
- lcd-13-240x240-driver - JNI wrapper of native driver implementation
- lcd-13-240x240-driver-example - example of use for JNI wrapper
This code requires hardware and native libraries to run. Whole project needs to be compiled and run on Raspberry PI raspbian lite distribution (tested with raspbian lite 'stretch').
This is description of initial setup of raspberry pi device.
- this setup is tested with raspbian Stretch Lite (2018-11-13)
- using
raspi-config
enable I2C and SPI (restart required) - make sure that
/etc/modules
containsi2c-dev spi-dev
- install java
apt-get install openjdk-8-jdk-headless
- download and install gradle
- install wiringpi
apt-get install wiringpi
- make sure wiringpi is installed by running
gpio -v
- install git
apt-get install git
This project must be compiled in Raspberry Pi, because is native code depends on wiringpi library. Java components from this project may be compiled on x86 platform. To build complete project on Raspberry Pi:
gradle clean build
To build complete project and install java driver artifact into local maven repository:
gradle clean build install
To run demo on Raspberry Pi, build project and:
cd lcd-13-240x240-driver-example/build/application/
./start-demo.sh