b'Circuit 4B:Want to create a DIY environmental monitor or weather station? You can use Temperaturea small, low-cost sensor like the TMP36 Sensorto make devices that track and respond to temperature. In this activity you will also use the LCD screen to display sensor readings, a common use for LCDs in electronics projects. TMPPOTENTIOMETERTEMPERATURE SENSOR19 JUMPER WIRES YOULCD DISPLAYNEEDNEW COMPONENTS voltage = analogRead(A0) * 0.004882813;TMP36 TEMPERATURE SENSOR:The number we are multiplying by comes This temperature sensor has three legs.from dividing 5V by the number of samples One connects to 5V, one to ground, and thethe analog pin can read (1024), so we get:voltage output from the third leg varies5 / 1024 = 0.004882813.proportionally to changes in temperature. By doing some simple math with thisThe second formula takes that 05V value voltage, we can measure temperature inand calculates degrees Celsius:degrees Celsius or Fahrenheit. degreesC = (voltage - 0.5) * 100.0;The reason 0.5V is subtracted from the TMP calculated voltage is because there is a 0.5V offset, mentioned on page 8 of the TMP36 NEW CONCEPTS datasheet found here: http://sfe.io/TMP36. ALGORITHMS: An algorithm is a processIts then multiplied by 100 to get a value that matches temperature.used in order to achieve a desired result. Often, the information needed to createThe last formula takes the Celsius an algorithm lives in the parts datasheet.temperature and converts it to a This sketch uses a few formulas to turnFahrenheit temperature using the standard a voltage value into a temperatureconversion formula:value, making them all part of the largerdegreesF = degreesC * (9.0/5.0) + 32.0;temperature-retrieving algorithm. The first formula takes the voltage read on analogTogether, these three formulas make up the pin 0 and multiplies it to get a voltage valuealgorithm that converts voltage to degrees from 0V5V: Fahrenheit.77 : circuit 4b'