(*) The 1-Wire breakout cable comes in two variants depending on availability.
Quick start guide for 1-Wire Automation Software
The 1-Wire server fully supports the PiWire+. To add the PiWire+ send the following client command:
adapter "PiWire+" add bscdetect abiowire
Variations are possible. Refer to the user manual for more information.
Quick start guide for owfs
The PiWire+ can be used with owfs, the 1-Wire File System. This software package is available from this website.
The owfs programs support a uniform command line syntax for specifying which 1-Wire adapters to detect and to expose. For the PiWire+, the --i2c command line option is of importance.
If you specify --i2c the owfs programs require the presence of i2c-dev. If the i2c-dev interface is not present, you can activate it by running the following commands as root:
The following files will be created:
- /dev/i2c-0 – i2c-dev interface for BSC0.
- /dev/i2c-1 – i2c-dev interface for BSC1.
More recent Linux distribtions come with configuration tool raspi-config that provides menus for setting up I2C.
Suppose you want to set up a web server that listens to port 80. Suppose the PiWire+ is connected to BSC1 of your Raspberry Pi computer. Enter the following command as root in the bin directory of owfs:
./owhttpd -p 80 –-i2c=/dev/i2c-1:0 –-i2c=/dev/i2c-1:1 –-i2c=/dev/i2c-1:2
The /dev/i2c-<n>:<i> syntax denotes offset <n> from I2C address 0011000b on I2C bus of <i>. The mentioned command line syntax thus tells owhttpd to look for 1-Wire controllers at addresses 0011000b, 0011001b and 0011010b on the I2C bus of BSC1. The type of 1-Wire controller doesn't need to be specified; the owfs software can distinguish between a DS2482-800 and a DS2482-100 chip.
Refer to the owfs documentation for more information.