JPigpio is an all java interface to the pigpio socket interface of the pigpio library. JPigpio is a work in progress. Currently just a few of the pigpio commands are available. This includes the general commands to set/get the mode of a GPIO pin, read/write to/from a GPIO pin, set/get servo pulsewidth, the commands to set up notifications on level changes, get the ticks since boot and version information. More commands will be added regularly to this list.
If anybody would like to contribute to this project I would be more than happy to list you as a contributer on the website. My email contact is pi at knutejohnson dot com.
- A RaspberryPi with RaspberryPi OS installed.
- pigpio daemon installed and running on a Pi, preferrably version 78 or later.
- A copy of the JPigpio.jar in your class path.
- To use JPigpio with a Java source file: java -cp JPigpio.jar YourClass.java
- To use JPigpio with a Java application stored in a
- Create your Java source file: YourClass.java
- javac -cp JPigpio.jar [JPigpioGUI.jar] YourClass.java
- Make a manifest file: YourClass.man
Class-Path: JPigpio.jar [JPigpioGUI.jar]
- jar -cvfm YourClass.jar YourClass.man *.class
- Run it with: java -jar YourClass.jar
- To run the example programs you can run the
JPigpioExamples.jar using the name of the sample
and the required parameters on the command line or
you can put JPigpioExamples.jar in your class path and
specify the complete package name of the sample program.
- java -jar JPigpioExamples.jar Read 20
- java -cp JPigpioExamples.jar com.knutejohnson.pi.jpigpio.Versions
- The JPButtonExample.jar program is run with: java -jar JPButtonExample.jar
- If you find a bug, please email a report to pi at knutejohnson dot com and I will fix it as soon as possible. Please consider submitting a fix too.