read temperature from DHT11, using pi4j
I the tried the code in the following link with prerequisites :
Java 1.8.0_65
pi4j 1.1
Raspberry Pi 3 Model B
DHT22 Temperature sensor.
Here when I am trying to execute the following both codes available in the link I am facing the issue regarding the LibPins
in the code
public DHT11(int pin) {
final GpioController gpio = GpioFactory.getInstance();
dht11Pin = gpio.provisionDigitalMultipurposePin(LibPins.getPin(pin),
PinMode.DIGITAL_INPUT, PinPullResistance.PULL_UP);
}
and in the other code snippet I am getting the output as "Data not good,Skip" But for the second code in the link I was getting the output for few set of readings and after its outputting as "Data not good,Skip".
I am working on reading the temperature connected to pi gpio pins using java and pi4j library.
Thanks in Advance.