{"id":154,"date":"2015-05-27T23:10:33","date_gmt":"2015-05-28T03:10:33","guid":{"rendered":"http:\/\/puck.nether.net\/~jared\/blog\/?p=154"},"modified":"2015-05-27T23:38:19","modified_gmt":"2015-05-28T03:38:19","slug":"raspberry-pi2-and-both-i2c-busses","status":"publish","type":"post","link":"https:\/\/puck.nether.net\/~jared\/blog\/?p=154","title":{"rendered":"Raspberry PI2 and both i2c busses"},"content":{"rendered":"<p>I&#8217;m working on a project that uses devices that have overlapping i2c addresses. In more recent raspberry pi instances they changed how this works and there is quite a bit of confusion on forums about how to do this. Here&#8217;s your 2015 update for using NOOBS as a starting point:<\/p>\n<p>Add these two lines to \/boot\/config.txt:<\/p>\n<p>echo dtparam=i2c_arm=on &gt;&gt; \/boot\/config.txt<br \/>\necho dtparam=i2c_vc=on &gt;&gt; \/boot\/config.txt<\/p>\n<p>append bcm2708.vc_i2c_override=1 to \/boot\/cmdline.txt<\/p>\n<p>WIth this, you can use both i2c, pins 3,5 and 27,28. Keep in mind you may need a pull-up for pins 27,28 and your i2c setup, where 3,5 have them on-board.<\/p>\n<p>root@raspberrypi:\/home\/pi# i2cdetect -l<br \/>\ni2c-0\u00a0\u00a0 \u00a0i2c\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a03f205000.i2c\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0I2C adapter<br \/>\ni2c-1\u00a0\u00a0 \u00a0i2c\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a03f804000.i2c\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0I2C adapter<\/p>\n<p>root@raspberrypi:\/home\/pi# ls -ld \/dev\/i2c*<br \/>\ncrw-rw&#8212;T 1 root i2c 89, 0 May 27 01:08 \/dev\/i2c-0<br \/>\ncrw-rw&#8212;T 1 root i2c 89, 1 May 27 01:08 \/dev\/i2c-1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working on a project that uses devices that have overlapping i2c addresses. In more recent raspberry pi instances they changed how this works and there is quite a bit of confusion on forums about how to do this. Here&#8217;s your 2015 update for using NOOBS as a starting point: Add these two lines to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,26],"tags":[],"class_list":["post-154","post","type-post","status-publish","format-standard","hentry","category-internet","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=\/wp\/v2\/posts\/154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=154"}],"version-history":[{"count":3,"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":159,"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=\/wp\/v2\/posts\/154\/revisions\/159"}],"wp:attachment":[{"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puck.nether.net\/~jared\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}