Take VIM1 as an example, VIM2 please replace dtb with kvim2_linux.dtb
, and VIM3 please replace dtb with kvim3_linux.dtb
.
Connect 1-Wire module
vim /boot/env.txt |
Add onewire to configuration file
overlays=uart4 pwm_ao_a pwm_f i2c0 --> overlays=uart4 pwm_ao_a pwm_f i2c0 onewire |
For details on overlays, please refer to how to use device tree overlays
How TO Use
enter driver directory,
khadas@Khadas:~$ cd /sys/bus/w1/devices |
the ds18b20
node is 28-0119395ebf91
. enter node directory,
khadas@Khadas:/sys/bus/w1/devices$ cd 28-0119395ebf91 |
The value of the module can be read by reading the w1_slave
file.
khadas@Khadas:/sys/bus/w1/devices/28-0119395ebf91$ cat w1_slave |