Pi4J version 2.0 brings with it many new features, and an entirely new architecture that focuses on extensibility, simplified integration and a modern Java API including the following:
In addition to the features listed above, Pi4J version 2.0 also abandons the old WiringPi pin numbering scheme in favor of the more traditional and commonly used Broadcom pin numbering scheme. This pin numbering scheme has been a source of confusion for a number of years, especially with beginners and is somewhat cumbersome to maintain as new Raspberry Pi models are introduces with differing or added GPIO pins. Moving forward, Pi4J will only use the Broadcom (BCM) pin numbering scheme.
The WiringPi project has now been deprecated (see wiringpi.com/wiringpi-deprecated/). Pi4J version 2.0 will no longer be based on WiringPi and has moved to using the PIGPIO library (http://abyz.me.uk/rpi/pigpio/) internally for low level integation. With this move, we will also support the remote I/O features (via TCP socket) offered by the PIGPIO daemon (http://abyz.me.uk/rpi/pigpio/pigpiod.html).
Starting with the Pi4J 2.0 builds, the Pi4J project is prioritizing focus on providing Java programs access, control and communication with the core I/O capabilities of the Raspberry Pi platform. Earlier versions of Pi4J were perhaps too ambitious in scope and that led to significant project bloat to the point that the project was becoming unsustainable. The goal moving forward is to limit scope to that of the raw I/O capabilities of the Raspberry Pi platform and provide timely updates and releases for bug fixed and new RaspberryPi model introductions. Reducing the scope of the project should better serve the Java community for basic I/O access by reducing complexity.
The following features have been removed from the Pi4J library:
The Pi4J V.2 source code is available in this GitHub repository: Pi4J V.2 GitHub Repository
git clone https://github.com/Pi4J/pi4j-v2
(Please note, this repository is only temporary, and the sources can later be moved to the main Pi4J repo. Thus, any forks from this temporary repository will be broken after the move.)
Pi4J V.2 is still considered EXPERIMENTAL at this point. While many parts of the project are working, there are still a number of areas that require further development and certain APIs are subject to change without notice. A significant portion of the code is presently undocumented and hardware integration testing is incomplete. It is not recommended to use Pi4J V.2 in any production workload at this time.
For a more detailed account of the project status, please see this page: About > Project Status.