Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pi@raspberrypi:~ $ sudo usermod -aG i2c pi
- pi@raspberrypi:~ $ cat /etc/modprobe.d/raspi-blacklist.conf
- pi@raspberrypi:~ $ modprobe i2c_dev
- pi@raspberrypi:~ $ lsmod
- Module Size Used by
- cfg80211 427855 0
- rfkill 16037 1 cfg80211
- snd_bcm2835 20511 0
- snd_pcm 75698 1 snd_bcm2835
- snd_timer 19160 1 snd_pcm
- snd 51844 3 snd_bcm2835,snd_timer,snd_pcm
- bcm2835_gpiomem 3040 0
- bcm2835_wdt 3225 0
- uio_pdrv_genirq 3164 0
- uio 8000 1 uio_pdrv_genirq
- w1_therm 3584 0
- ds2482 3580 0
- wire 25219 2 w1_therm,ds2482
- cn 4374 1 wire
- i2c_dev 5859 0
- i2c_bcm2708 4770 0
- ipv6 347530 37
- pi@raspberrypi:~ $ ls -l /dev/i2c-*
- crw-rw---- 1 root i2c 89, 1 Jan 29 17:09 /dev/i2c-1
- pi@raspberrypi:~ $ cat /boot/config.txt | grep dtparam
- dtparam=i2c_arm=on
- #dtparam=i2s=on
- #dtparam=spi=on
- dtparam=audio=on
- dtparam=spi=off
- pi@raspberrypi:~ $ apt-get install i2c-tools
- E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
- E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
- pi@raspberrypi:~ $ sudo apt-get install i2c-tools
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- Suggested packages:
- libi2c-dev python-smbus
- The following NEW packages will be installed:
- i2c-tools
- 0 upgraded, 1 newly installed, 0 to remove and 63 not upgraded.
- Need to get 51.3 kB of archives.
- After this operation, 227 kB of additional disk space will be used.
- Get:1 http://archive.raspberrypi.org/debian/ jessie/main i2c-tools armhf 3.1.1+svn-2 [51.3 kB]
- Fetched 51.3 kB in 0s (200 kB/s)
- Selecting previously unselected package i2c-tools.
- (Reading database ... 40810 files and directories currently installed.)
- Preparing to unpack .../i2c-tools_3.1.1+svn-2_armhf.deb ...
- Unpacking i2c-tools (3.1.1+svn-2) ...
- Processing triggers for man-db (2.7.0.2-5) ...
- Setting up i2c-tools (3.1.1+svn-2) ...
- /run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.
- pi@raspberrypi:~ $ i2cdetect -y 1
- 0 1 2 3 4 5 6 7 8 9 a b c d e f
- 00: -- -- -- -- -- -- -- -- -- -- -- -- --
- 10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
- 70: -- -- -- -- -- -- -- --
- pi@raspberrypi:~ $ i2cdetect -l
- i2c-1 i2c 3f804000.i2c I2C adapter
- pi@raspberrypi:~ $ i2cget -y 1 0x18
- Error: Could not set address to 0x18: Device or resource busy
- pi@raspberrypi:~ $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement