DopW
1
Hi all.
I'm trying to read temperature from a DS18B20 sensor.
I'm following this instructions : https://openwrt.org/docs/techref/hardware/port.gpio/1-wire
Now that I've installed packages and configured all, how do I read the temperature from the sensor?
tmomas
2
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
DopW
4
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.
DopW
7
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
mk24
8
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.
tmomas
9
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.
system
Closed
10
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.