Thanks a lot everybody. My problem was solved. Turns out, that the sensor had somehow stopped working(It was working previously when I tested it on Arduino). I could fortunately lay hands on another DHT11 sensor, and connected it as per your instructions, its now working perfectly well. Thanks a lot again everyone.