root@rpi2:~ # sysctl dev.ow
dev.ow.0.%parent: owc0
dev.ow.0.%pnpinfo:
dev.ow.0.%location:
dev.ow.0.%driver: ow
dev.ow.0.%desc: 1 Wire Bus
dev.ow.%parent:
root@rpi2:~ # sysctl dev.owc
dev.owc.0.%parent: gpiobus0
dev.owc.0.%pnpinfo: name=onewire compat=w1-gpio
dev.owc.0.%location: pin=4
dev.owc.0.%driver: owc
dev.owc.0.%desc: FDT GPIO attached one-wire bus
dev.owc.%parent:
root@rpi2:~ # sysctl dev.ow_temp
dev.ow_temp.0.parasite: 0
dev.ow_temp.0.reading_interval: 1000
dev.ow_temp.0.badread: 0
dev.ow_temp.0.badcrc: 0
dev.ow_temp.0.temperature: 23.500C
dev.ow_temp.0.%parent: ow0
dev.ow_temp.0.%pnpinfo: romid=28:ee:04:0c:1d:16:02:89
dev.ow_temp.0.%location:
dev.ow_temp.0.%driver: ow_temp
dev.ow_temp.0.%desc: Advanced One Wire Temperature
dev.ow_temp.%parent:
root@rpi2:~ # sysctl dev.ow
dev.ow.2.%parent: owc2
dev.ow.2.%pnpinfo:
dev.ow.2.%location:
dev.ow.2.%driver: ow
dev.ow.2.%desc: 1 Wire Bus
dev.ow.1.%parent: owc1
dev.ow.1.%pnpinfo:
dev.ow.1.%location:
dev.ow.1.%driver: ow
dev.ow.1.%desc: 1 Wire Bus
dev.ow.0.%parent: owc0
dev.ow.0.%pnpinfo:
dev.ow.0.%location:
dev.ow.0.%driver: ow
dev.ow.0.%desc: 1 Wire Bus
dev.ow.%parent:
root@rpi2:~ # sysctl dev.owc
dev.owc.2.%parent: gpiobus0
dev.owc.2.%pnpinfo: name=onewire2 compat=w1-gpio
dev.owc.2.%location: pin=22
dev.owc.2.%driver: owc
dev.owc.2.%desc: FDT GPIO attached one-wire bus
dev.owc.1.%parent: gpiobus0
dev.owc.1.%pnpinfo: name=onewire1 compat=w1-gpio
dev.owc.1.%location: pin=27
dev.owc.1.%driver: owc
dev.owc.1.%desc: FDT GPIO attached one-wire bus
dev.owc.0.%parent: gpiobus0
dev.owc.0.%pnpinfo: name=onewire0 compat=w1-gpio
dev.owc.0.%location: pin=17
dev.owc.0.%driver: owc
dev.owc.0.%desc: FDT GPIO attached one-wire bus
dev.owc.%parent:
root@rpi2:~ # sysctl dev.ow_temp
dev.ow_temp.2.parasite: 0
dev.ow_temp.2.reading_interval: 1000
dev.ow_temp.2.badread: 0
dev.ow_temp.2.badcrc: 15
dev.ow_temp.2.temperature: 22.875C
dev.ow_temp.2.%parent: ow2
dev.ow_temp.2.%pnpinfo: romid=28:ee:6c:0c:20:16:01:8a
dev.ow_temp.2.%location:
dev.ow_temp.2.%driver: ow_temp
dev.ow_temp.2.%desc: Advanced One Wire Temperature
dev.ow_temp.1.parasite: 0
dev.ow_temp.1.reading_interval: 1000
dev.ow_temp.1.badread: 0
dev.ow_temp.1.badcrc: 23
dev.ow_temp.1.temperature: 22.687C
dev.ow_temp.1.%parent: ow1
dev.ow_temp.1.%pnpinfo: romid=28:ee:a3:1c:20:16:01:ff
dev.ow_temp.1.%location:
dev.ow_temp.1.%driver: ow_temp
dev.ow_temp.1.%desc: Advanced One Wire Temperature
dev.ow_temp.0.parasite: 0
dev.ow_temp.0.reading_interval: 1000
dev.ow_temp.0.badread: 0
dev.ow_temp.0.badcrc: 19
dev.ow_temp.0.temperature: 23.062C
dev.ow_temp.0.%parent: ow0
dev.ow_temp.0.%pnpinfo: romid=28:ee:e0:02:1d:16:02:59
dev.ow_temp.0.%location:
dev.ow_temp.0.%driver: ow_temp
dev.ow_temp.0.%desc: Advanced One Wire Temperature
dev.ow_temp.%parent:
};
onewire0 {
compatible = "w1-gpio";
gpios = <&gpio 17 1>;
};
onewire1 {
compatible = "w1-gpio";
gpios = <&gpio 27 1>;
};
onewire2 {
compatible = "w1-gpio";
gpios = <&gpio 22 1>;
};
};
onewire {
compatible = "w1-gpio";
gpios = <&gpio 17 1>,<&gpio 27 1>,<&gpio 22 1>;
};
Excuse me? I understand that you will want to put a resistor the correct way to be able to read the markings in the correct order, but other than that resistors are not directional. In an electrical circuit, they will work no matter which way they are connected.The resistors are also directional. They only work in one direction.
We use one-wire setups in a 500+ units lab security system and have tested length up to 100m with no problems. Even tried looping it around the spark-plug of a running engine - no problems. Twisted/untwisted is not relevant since one-wire does not use current loop. Plain standard 4wire telephone wire works just as well.How much wire length can I run to each detector?
RJ11 Signal RJ9 wire colour
1 VCC -
2 GND 1 black
3 1Wdata 2 red
4 1Wgnd 3 green
5 NC 4 yellow
6 WAKE -
FreeBSD 11.0-RELEASE-p6 (RPI2) #0 r308093M: Wed Jan 4 19:31:07 EST 2017
Welcome to FreeBSD!
root@rpi2:~ # uptime
9:34PM up 43 days, 14:58, 1 users, load averages: 0.01, 0.03, 0.00
root@rpi2:~ # ntpdate ntp.org
4 Apr 21:38:12 ntpdate[31062]: step time server 128.4.24.98 offset -14.882408 sec
root@rpi2:~/1wire # ./get_owtemp
OneWire Temperature Sensor #0= 24C
OneWire Temperature Sensor #1= 24C
OneWire Temperature Sensor #2= 26C
OneWire Temperature Sensor #3= 24C
OneWire Temperature Sensor #4= 24C
OneWire Temperature Sensor #5= -273C