From the course: Learning Arduino: Interfacing with Analog Devices
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Interpreting the sensor values - Arduino Tutorial
From the course: Learning Arduino: Interfacing with Analog Devices
Interpreting the sensor values
- [Narrator] This is an optional example to further understand the concept using the previous equations to calculate the temperature. I'll be using these two equations in order to calculate the temperature produced by the temperature sensor. Let's say for example, that once I use the Arduino software, I read a value of 110. Remember, Arduino uses ADC to read values between zero and 1,023, representing zero to 5,000 millivolts. And we use this relationship in order to calculate the voltage output. So, the output voltage equals the value read from the analog pin, times 5,000 over 1,023, and this equals around 537 millivolts. Now we know the voltage output, then we use the second equation in order to know the temperature of the sensor. So, using the equation, the temperature is around 26.8 degrees Celsius. You can also use one equation when it's applicable. So, you can find the temperature the same exact way.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What are analog devices?2m 3s
-
Understanding analog-to-digital converters1m 50s
-
(Locked)
Exploring our temperature sensor (TMP37)2m 29s
-
(Locked)
Understanding how to interpret the sensor values2m 55s
-
(Locked)
Interpreting the sensor values1m 16s
-
(Locked)
Wiring up the temperature sensor57s
-
(Locked)
Coding to read the temperature sensor4m 56s
-
(Locked)
LDR (light-dependent resistor) sensor1m 36s
-
(Locked)
Using a voltage divider with our LDR3m 43s
-
Wiring up our LDR circuit1m 26s
-
(Locked)
Coding to read the LDR circuit3m 56s
-
(Locked)
Joystick module2m 9s
-
(Locked)
Wiring up our joystick1m 9s
-
(Locked)
Coding the joystick circuit4m 47s
-
-
-
-
-