Yes, I was starting to think that - the code itself is quite simple, and the duplication is probably worth it to simplify things.
I guess it depends whether there are any other differences between them apart from just DHT11 and DHT22?
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, I was starting to think that - the code itself is quite simple, and the duplication is probably worth it to simplify things.
I guess it depends whether there are any other differences between them apart from just DHT11 and DHT22?