Advertisement
Guest User

Untitled

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