gpioPins.put(1, RaspiPin.GPIO_01); |
So if you just replace it with the pin you want to use in your code, e.g. RaspiPin.GPIO_02 Frank |
Hi Chris,
One of the issues with the DHT11 is its fussy timing requirements. You can use the checksum in the message block and retry but it's still a pain.
There are two solutions I can recommend.
The first is to use the kernel drivers on the Pi and read the data using that. None of that tedious GPIO mucking about, just open a file and read the data.
Option 2 is to use one of the mroe modern replacements. The DHT22 is not only more accurate but the variants of it come with I2C interfaces which make it a far easier experience to work with.
Hope this helps.
Jim.
--
You received this message because you are subscribed to the Google Groups "Pi4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pi4j+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pi4j/51b2320d-f192-445e-9d46-bad2321ab8cfo%40googlegroups.com.