views:

308

answers:

7

Getting cooler these days, thought it's a good idea adding some temperature function in apps, anyone knows iPhone has the hardware to support that?

+3  A: 

Unfortunately there isn't. Any thermometer that were ever included in the iPhone would be affected by the internal temperature of the device anyway (they get hot!)

ridecar2
Oddly enough, there is an internal sensor that measures temperature. There is no public API onto it.
rpetrich
I think you're right, if there is the sensor, like rpetrich said, the heat of the device effects the result, then the sensor probably design for protect device from overheating, not for measuring the air.
flutewang
I came up an idea of this, Andrew Dunn mentioned microphone, we know lots of phones using two microphones' recordings subtract out the human voice, I think if there is a thermometer, and an energy counter counts the energy the device burns, could subtracts out the environment temperature. Counter tells the temperature should be; thermometer tells the temperature actually is; then the subtraction tells what environment the thermometer is in. Of course theoretically, thank you Andrew for the microphone!
flutewang
+5  A: 

If you're desperate, you could record the sound of crickets chirping using the iPhone's microphone and analyse it's frequency to get the temperature. But otherwise no.

Andrew Dunn
Besides, that would only work at night time.
Andrew Dunn
That's fun! I still want to know, is the temperature effects crickets to chirp or the frequency broadcasting in the air? or both of them?
flutewang
It's the crickets. Air density affects the speed of sound and the wavelength of the sound, while the frequency remains constant.
Andrew Dunn
+7  A: 

I know this is not what you thought of, but anyway:

Get the current position (you only need to know the town / region, GPS is not required). Then get the current temperature for this place from the internet (weather channel or so).

Thomas Mueller
Yeah, that's probably the solution for now, thanks!
flutewang
I would get the information from: http://www.nws.noaa.gov/forecasts/xml/
Brad
Thank you Brad, I'm checking it now, :)
flutewang
+2  A: 

hardware support: no but u can always cheat and use the internet to get local forecast :)

saadlulu
+2  A: 

There isn't anything available to user apps and frankly there should be. Lets face the senor would be directly affected by local conditions but some times that is exactly what you want. This is probably a good item to file a bug report against. A barometer wouldn't be a bad idea either.

Dave

David Frantz
+1  A: 

I came up an idea of this, Andrew Dunn mentioned microphone, we know lots of phones using two microphones' recordings subtract out the human voice, I think if there is a thermometer, and there is an energy counter counts the energy the device burns, could subtracts out the environment temperature. Counter tells the temperature should be; thermometer tells the temperature actually is; then the subtraction tells what environment the thermometer (device) is in. Of course theoretically, thank you Andrew for the microphone!

flutewang
Simply, using two data of measurements to cancel the device heat, if there are such meters or sensors in the device. like two microphones.
flutewang
+2  A: 

Realistically, you could probably cobble together a 555 timer chip and a thermistor to produce a frequency in the audio range for your temperatures of interest. Feed that audio to the mic input on the headset jack of an iDevice via an attenuation resistor.

Bonus points if you play loud music thru the headset output at the same time, and can figure out how to harvest that audio output energy with an AC-to-DC converter to power the 555 chip.

Would work even in climates where crickets might be hard to find alive.

hotpaw2