Temperature sensor LM35 with TinkerPie
A simple analog thermometer probe: 10 mV per degree.
| Type | Analog sensors |
|---|---|
| Connect to | P10-P13 |
| Gives | °C (2-150) |
| Simulator | Yes: a control appears under the simulated board |
How it works
The LM35 gives out a voltage that grows by 10 millivolts for every degree Celsius (0 V at 0 °C, 250 mV at 25 °C). The board reads the voltage and TinkerPie turns it into degrees.
How to wire it
Plug the module's A0 / OUT into P10 (or P11-P13 when Wi-Fi is off), VCC to 3.3 V, GND to GND.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.lm35Temperature(Pin.P10)
// Arduino C++
sensors::lm35Temperature(Pin::P10) Good to know
- Accuracy about ±0.5 °C at room temperature.
- Power it from 5 V (it needs at least 4 V); its output is still safe for the board.
- Basic wiring measures from about 2 °C up to 150 °C.
Similar modules
- Potentiometer (knob)
- Soil moisture sensor
- Light sensor module (LDR)
- Sound sensor module
- Gas / smoke sensor MQ-2
- Air quality sensor MQ-135
- Rain drop sensor
- Water level sensor
More projects to try
Questions
Can I try the Temperature sensor LM35 without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Why is my LM35 reading jumpy?
Small voltages pick up noise. Average several readings, keep the wires short, and power it from 5 V.