1 Wire on OPI Zero
Hello every one,if i enable kernel modules
w1-sunxi
w1-gpio
w1-thermwhere should i connect data from 1-wire bus so can populate /sys/bus/w1/devices?
Every tutorial states PA20 but i cannot use it on OPI Zero.
Best Regards
G
Edited by nopnop2002 at 2017-8-5 17:10
1.edit your /etc/default/cpufrequtils
After edit.
$ cat /etc/default/cpufrequtils
ENABLE=true
MIN_SPEED=480000
MAX_SPEED=1200000
GOVERNOR=interactive
2.reboot
3.driver load
sudo modprobe w1-sunxi
sudo modprobe w1-gpio
sudo modprobe w1-therm
4.check gpio
$dmesg
[ 34.067409] W1_SUNXI: Added w1-gpio on GPIO-10
I connected ds18b20 to gpio10 with pullup
orangepi@orangepizero:~$ ls /sys/bus/w1/devices/
28-021600b0a4ffw1_bus_master1
orangepi@orangepizero:~$ cat /sys/bus/w1/devices/28-021600b0a4ff/w1_slave
ce 01 4b 46 7f ff 0c 10 97 : crc=97 YES
ce 01 4b 46 7f ff 0c 10 97 t=28875
orangepi@orangepizero:~$
# cat /boot/armbianEnv.txt
verbosity=1
logo=disabled
console=both
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=usbhost2 usbhost3 w1-gpio
param_w1_pin=PA15
rootdev=UUID=ebe9dacf-124f-486c-b6c1-08749e209374
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
# ls /sys/bus/w1/devices/ ; cat /sys/bus/w1/devices/28*/w1_slave
28-0517025727ffw1_bus_master1
62 00 4b 46 7f ff 0c 10 af : crc=af YES
62 00 4b 46 7f ff 0c 10 af t=6125
ARMBIAN 5.35 user-built Ubuntu 16.04.3 LTS 4.13.16-sunxi
1W can only work on pin MOSI; if this pin is already used, you are doomed.
NB: on opi0, there are two MOSI, so with a bit of work, it should be possible to use the NAND MOSI for 1W.
https://forum.armbian.com/topic/1395-orange-pi-pc-1-wire/?page=2 1W can only work on pin MOSIit can work also on I2C (DS2482) and UART (DS2480B): https://github.com/rororor/opiot-01
page:
[1]