I'm fairly new to the Arduino world. I went through the starter kit and had success with all of the experiments, so I decided to combine two. I wanted to read the TMP36 temperature sensor with my UNO, and output temperatures in Fareneheit to the LCD display. It was pretty straightforward and I had success with it, showing around 74 degrees F.
Then I tried to check the temperature outside. When I powered my Arduino using a 9v battery to the Vin pin, 5v power supply to Vin pin, or 5v wall wart, the display showed 105-130. I read that the temperature sensor needs its own ground so I have a wire going to one of the Arduino grounds on the other side of the board from the LCD's ground.
Any ideas on why this would happen? I went over my code for about an hour, the whole time plugged in to USB and the temperature stayed between 72 and 74.
voltage = (sensorVal/1024.0)*5.0;
float temperature = (voltage-0.5)*100; //new variable Temperature which is equivalent to the (voltage-0.5)100
float Fah = (temperature9/5)+32;