Raspberry Pi - Joy-It SensorKit X40 - Pi4J Sensor implementation
sudo apt-get update
sudo apt-get install oracle-java8-jdk
Install WiringPi Native library Wiring Pi download and install
sudo apt-get update
sudo apt-get install git
mkdir wiringPiSource
cd wiringPiSource
git clone git://git.drogon.net/wiringPi
cd wiringPi
build
test if install was successful
gpio -v
# or
gpio readall
- Run sudo raspi-config.
- Use the down arrow to select 5 Interfacing Options
- Arrow down to P5 I2C.
- Select yes when it asks you to enable I2C
- Also select yes if it asks about automatically loading the kernel module.
- Use the right arrow to select the button.
- Select yes when it asks to reboot.
Please check pi4j compatibility list here Wiring PI Homepage
curl -s get.pi4j.com | sudo bash
mkdir pi4j && cd pi4j
wget http://get.pi4j.com/download/pi4j-1.2-SNAPSHOT.deb
sudo dpkg -i pi4j-1.2-SNAPSHOT.deb
pi4j -version
cd ../raspberry-sensors-pi4j/src/
javac -classpath .:/opt/pi4j/lib/* -d . ./at/schinivision/Pi4jsensors.java
sudo java -classpath .:classes:/opt/pi4j/lib/'*' at.schinivision.Pi4jsensors