1.創建maven項目 略2.項目的pom文件中引入pi4j的jar包
地址:https://mvnrepository.com/artifact/com.pi4j/pi4j-core/1.2
<!-- https://mvnrepository.com/artifact/com.pi4j/pi4j-core -->
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.2</version>
</dependency>
其他下載方式:
代碼下載
https://pi4j.com/1.2/download.html
Download
You can use any of the following methods to download the Pi4J library.
Direct Download
Maven Repository
Source Repository
Direct Download
You can download the compiled Pi4J library JARs directly here:
RELEASE BUILDS
pi4j-1.2.deb Debian Installer Package
pi4j-1.2.zip Compressed ZIP Archive
LATES