LM35: the chip that speaks °C
// WHAT YOU WILL LEARN
OUT = 10 mV per °C (25 °C = 250 mV); on A0: tempC = raw × 500 ÷ 1024.
// LESSON NOTES
Can your Arduino feel the temperature? Meet the LM35 🌡️
1️⃣ 10 mV PER °C: three legs — +5V, OUT, GND (flat face toward you). The OUT leg gives 10 millivolts for every degree Celsius.
2️⃣ REAL NUMBERS: 25 °C → 250 mV. Hot tea at 60 °C → 600 mV. 100 °C → 1 V. You can check it with a multimeter.
3️⃣ ARDUINO CODE: connect OUT to A0, then:int raw = analogRead(A0);float tempC = raw * 500.0 / 1024;Serial.println(tempC);
(5 V ÷ 1024 steps = 4.88 mV per step, and 10 mV = 1 °C → × 500 ÷ 1024.)
📌 10 mV per °C — that's the LM35.
CODE FROM THIS LESSON
int raw = analogRead(A0);
float tempC = raw * 500.0 / 1024;
Serial.println(tempC);Read the voiceover (transcript)
- Can your Arduino feel the temperature?
- Meet the LM35. Three legs, and ten millivolts out for every degree.
- Twenty-five degrees? Two hundred fifty millivolts. Hot tea at sixty? Six hundred!
- Read A zero, times five hundred, divided by ten twenty-four: degrees Celsius!
- Ten millivolts per degree!
- Next: the LDR! Follow for part three!
Related lessons
// NEWSLETTER · FREE
Get new lessons + early access to the full course
One email when new lessons drop. No spam, unsubscribe any time.
✓ You're on the list. Check your inbox to confirm.
By joining you agree to the privacy policy.




