0

I've connected a temperature sensor (DS18B20) to my Pi and want to read it using 1-wire, but it doesn't work.

I have loaded the w1-gpio and w1-therm modules, added them to /etc/modules and rebooted a bunch of times.

This is the contents of /sys/bus/1w/devices:

ls

w1_bus_master1

i am using LM35 SENSOR

1 Answer 1

2

A LM35 sensor is not a DS18B20.

The LM35 signals the temperature by generating an analogue voltage proportional to the temperature which must be read by an external ADC attached to the Pi.

A DS18B20 is a digital sensor which signals the temperature by sending a digital bit pattern down a 1-wire bus (single wire) connected to the Pi.

You need to buy an ADC, e.g. a MCP3008 or similar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.