Konfiguration I2C Bus with 4 1Wire Pi Slaves
The 1 Wire Pi Plus and 1 Wire Pi Zero are a 1 Wire interface for the Raspberry Pi
31/10/2022
Posted by:
ma.huber@web.de
On every Slave are 3 to 6 1wire Temperature sensors, 13 Sensors in total.
I use I2C-SDA on GPIO Pin 3 and I2C-SCL on GPIO Pin 5.
- Do I need Pullup Resistors between 5V and SDA and SCL Line?
- How is the correct entry at /etc/rc.local? Are the following lines correct?
modprobe ds2482
sh - c "echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-1/new_device"
sh - c "echo ds2482 0x1a > /sys/bus/i2c/devices/i2c-2/new_device"
sh - c "echo ds2482 0x1b > /sys/bus/i2c/devices/i2c-3/new_device"
sh - c "echo ds2482 0x19 > /sys/bus/i2c/devices/i2c-4/new_device"
modprobe wire
Best regards,
Martin
31/10/2022
Posted by:
andrew
You do not need pull-up resistors on the I2C pins. The 1 Wire Pi includes 10K pull-up resistors on the SDA and SCL pins.
All of the 1 Wire Pi boards will be connected to the i2c-1 device on the Raspberry Pi so you will need to use that address for each board. The following lines should work to initialise the 1 Wire Pi boards.
modprobe ds2482
sh - c "echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-1/new_device"
sh - c "echo ds2482 0x1a > /sys/bus/i2c/devices/i2c-1/new_device"
sh - c "echo ds2482 0x1b > /sys/bus/i2c/devices/i2c-1/new_device"
sh - c "echo ds2482 0x19 > /sys/bus/i2c/devices/i2c-1/new_device"
modprobe wire
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.