Simple Java wrapper for Sense Hat which allows to write various applications in any JVM language
- Environmental sensors
- IMU (inertial measurement unit)
- LED Matrix
- Joystick (only blocking operation, must be used in separate thread)
- Install Python library for Sense Hat on RPi (https://github.com/RPi-Distro/python-sense-hat)
- Clone this repository (on RPi - git clone ...)
# On RPi
./gradlew clean build
# On different platform
./gradlew clean build -x test
- Copy build/libs/java-executor-1.0-SNAPSHOT.jar into your project classpath
- Alternatively it's possible to edit rpi.sense.hat.example.Project and run on RPi
./gradlew run
or as simple background process
nohup ./gradle run &
SenseHat senseHat = new SenseHat();
senseHat.environmentalSensor.<method>
senseHat.IMU.<method>
senseHat.ledMatrix.<method>
senseHat.joystick.<method>