Java, IoT, Internet of Things, Raspberry Pi, Pi4j.
the following code: import com.pi4j.io.gpio.*; import com.pi4j.io.gpio.event.*; public class TemperatureSensor { public interface TemperatureListener { void onTemperatureChange(double temperature); } private GpioPinDigitalInput pin; private TemperatureListener listener; public TemperatureSensor(Pin