dht11_withPython The complete code for the DHT11. Put JSON files in "/home/pi/Desktop/" directory. Use GPIO PIN 4 to connect the sensor to the Raspberry Pi. Run the python code.