安装jdk
apt-cache search jdk
apt-get install openjdk-8-jdk
root@raspberrypi:~# java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1+rpi1-b01)
OpenJDK Client VM (build 25.212-b01, mixed mode)
安装wiringpi
apt-get install wiringpi
root@raspberrypi:~# gpio -v
gpio version: 2.50
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
Type: Pi Zero-W, Revision: 01, Memory: 512MB, Maker: Sony
* Device tree is enabled.
*--> Raspberry Pi Zero W Rev 1.1
* This Raspberry Pi supports user-level GPIO access.
安装pi4j
curl -s get.pi4j.com | bash