Lesson goal: Measure the temperature of the room you're in

Home

As seen in the last lesson, you can read voltages in from the Arduino. This lesson will show you how to read the real temperature in the room you're in. It uses a device called the LM35DZ. This device outputs a voltage of 0.01 Volts for every $1^\circ$C in temperature of its environment.

Let's use the LM35DZ to read in some temperatures (100 of them), and use the linear mathematical relationship between $^\circ F$ and $^\circ C$ to display the temperature in both Celsius and Farenheight.

As you run through this lesson, try to watch the numbers in both $^\circ C$ and $^\circ F$ carefully. Which scale seems to show more change in response to the local temperature? (This is a key different between the two temperature scales.)
analogread(pin)
Move the mouse over a dotted box for more information.

Now you try. Can you figure out to 1) Make the voltage into the temperature in $^\circ C$, then 2) into $^\circ F$?

Type your code here:


See your results here: