TMP36 Analog Temperature Sensor
- Analog temperature sensor
- Measures environment temperature and returns a voltage
- Output voltage is linearly proportional to temperature
- What does this mean?
TMP 36 Datasheet
- What are the most important elements we should be looking for?
- 10 mV / deg Celsius with a 500 mV offset (since voltage is 500 mv at 0 deg Celsius)
- Try this: if Vout is 1.2V, what is the temperature in Celsius? in Fahrenheit?
T(fahr) = T(cel) * (9/5) + 32
T(cel) = (T(fahr) - 32 ) * (5/9)
- Division with
intsin C++ truncates decimals
int x = 3; int y = 6; float result = x / y; // 0 since 3/6 is truncated`
- Instead, make sure to cast (convert) one of the
intvalues to be a
int x = 3; int y = 6; float result = (float) x / y;
- Note that is BOTTOM VIEW
- Connect a TMP36 and output the current temperature to the serial monitor
- Consider what type of input is this signal? How will this value be read by Argon?