@bmishra4, @kennethlimcp, actually that sensor is deceiving. The datasheet indicates (at least for humidity) that the output voltage doesn’t go above 3.3v! For the temperature, it is measured as resistance so creating a voltage divider with the sensors temperature “resistor” should give you an acceptable voltage range. I found this post on an Arduino forum regarding using 3.3V instead of 5V:
There might be a solution:
change the ref voltage!
the humidity does not go over 3.3V
so ref voltage should be 3.3V (jumper from 3.3V to Ref)
Add a resistor between temp output and analog in so that the voltage does not go over 3.3 V at 80 or 100C (CAREFUL not to fry the Arduino)
this should increase the resolution
3.3V is now 1023
Humidity resolution will be almost 70% better
You may want to consider the DHT22 sensor instead. It is reliable, cheap, works at 3.3V and there are Spark libraries for it.