Read DS18B20 temperature

Hi all.

I'm trying to read temperature from a DS18B20 sensor.

I'm following this instructions :

Now that I've installed packages and configured all, how do I read the temperature from the sensor?

How have you connected the 18B20 to your device (btw: which device?)?

Once the sensor connected and recognized, you should be able to read data this way:
cat /sys/devices/w1_bus_master1/XX-1234567890/w1_slave

I do not see the device.
I have this dev KIT Carambola2

Connected 3.3V to sensor, GND and Data sig of sensor to pin 11 ( GPIO2 )
And in /etc/modules.d/55-w1-gpio-custom/ w1-gpio-custom bus0=0,2,0

Maybe the GPIO2 in not related to 2 on w1-gpio-custom bus0 ?

Test the desired GPIO# manually before configuring 1-wire support.

How ?
What do you mean?

Changin pin from 2 to 19 now it is working

root@OpenWrt:~# cat /sys/devices/w1_bus_master1/28-ee79961d64ff/w1_slave
e5 01 55 00 7f ff 0c 10 ed : crc=ed YES
e5 01 55 00 7f ff 0c 10 ed t=30312

Pin 2 conflicts with the SPI hardware. It probably is not possible to disable the SPI bus since it is needed to access the flash chip.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.