Java, IoT, Internet of Things, Raspberry Pi, Pi4j.
pinNumber, TemperatureListener listener) { this.listener = listener; GpioController gpio = GpioFactory.getInstance(); pin = gpio.provisionDigitalInputPin(pinNumber, PinPullResistance.PULL_DOWN); pin.addListener((GpioPinListenerDigital) event -> readTemperature()); } private void readTemperature() {