-
1How to install the device tree overlay completely including adding a software I2C port
To Install with the defaults. This is the best method if you don't want to manually edit files. Step 1 - Change to /home/pi and Download the install script pi@raspberry:~ cd ~ pi@raspberry:~ wget https://raw.githubusercontent.com/Theoi-Meteoroi/GPIO-pca9548/master/mux-install.sh
-
2Step 2 - Run the install script
pi@raspberry:~ /bin/bash mux-install.sh
-
3Step 3 - Reboot
After reboot, you should see something like this in dmesg output: [ 2.168710] systemd-udevd[137]: starting version 215 [ 2.527337] i2c-gpio i2c@0: using pins 23 (SDA) and 24 (SCL) [ 2.796954] i2c i2c-3: Added multiplexed i2c bus 4 [ 2.799319] i2c i2c-3: Added multiplexed i2c bus 5 [ 2.801690] i2c i2c-3: Added multiplexed i2c bus 6 [ 2.803925] i2c i2c-3: Added multiplexed i2c bus 7 [ 2.808755] i2c i2c-3: Added multiplexed i2c bus 8 [ 2.809316] i2c i2c-3: Added multiplexed i2c bus 9 [ 2.811035] i2c i2c-3: Added multiplexed i2c bus 10 [ 2.812586] i2c i2c-3: Added multiplexed i2c bus 11 [ 2.812604] pca954x 3-0070: registered 8 multiplexed busses for I2C switch pca9548 This is with the default i2c address of 0x70. You can pass another address in the declaration: dtoverlay=i2c_gpio-pca9548,addr=0x71
-
4Listing the detected I2C bus ports
You can also list out the configured I2C bus instances with pi@raspberry:~ sudo i2cdetect -l
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.