Take Edge-V as an example, Caption please replace dtb with rk3399-khadas-captain-linux.dtb
. Edge not support this driver.
Connect 1-Wire module
1 | vim /boot/env.txt |
Add onewire to configuration file (default is enable)
1 | overlays=i2c2 spi3 i2s0 onewire |
For details on overlays, please refer to how to use device tree overlays
How TO Use
enter driver directory,
1 | khadas@Khadas:~$ cd /sys/bus/w1/devices |
the ds18b20
node is 28-0119395ebf91
. enter node directory,
1 | khadas@Khadas:/sys/bus/w1/devices$ cd 28-0119395ebf91 |
The value of the module can be read by reading the w1_slave
file.
1 | khadas@Khadas:/sys/bus/w1/devices/28-0119395ebf91$ cat w1_slave |