{"id":3527,"date":"2020-01-23T22:16:44","date_gmt":"2020-01-23T13:16:44","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=3527"},"modified":"2020-01-30T14:15:23","modified_gmt":"2020-01-30T05:15:23","slug":"raspi-smbus-python%e3%83%91%e3%83%83%e3%82%b1%e3%83%bc%e3%82%b8","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/3527","title":{"rendered":"[RasPi] I2C(SMBus) Python\u30d1\u30c3\u30b1\u30fc\u30b8"},"content":{"rendered":"<h3>1. \u6982\u8981<\/h3>\n<ul>\n<li><strong>I2C<\/strong> : Inter-Integrated Circuit\u3002\uff12\u7dda\u5f0f\u30b7\u30ea\u30a2\u30eb\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002<\/li>\n<li><strong>SMBus<\/strong> : System Management Bus\u3002 I2C\u306e\u6d3e\u751f\u4ed5\u69d8\u3002<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h3>2. Python\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5<\/h3>\n<h4>2.0. \u6982\u8981<\/h4>\n<p>Raspberry Pi (raspbian) \u306e\u5834\u5408\u3001pip \/ pip3 \u306b\u3088\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u9593\u304c\u304b\u304b\u308b\u3002\u3057\u305f\u304c\u3063\u3066\u3001apt\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u306fapt\u304b\u3089\u5c0e\u5165\u3059\u308b\u306e\u304c\u63a8\u5968\u3067\u3042\u308b\u3002<\/p>\n<h4>2.1. apt<\/h4>\n<pre class=\"lang:sh decode:true \" >$ sudo apt install python-smbus<\/pre>\n<pre class=\"lang:sh decode:true \" >$ sudo apt install python3-smbus<\/pre>\n<h4>2.2. pip<\/h4>\n<pre class=\"lang:sh decode:true \" >$ sudo pip install smbus2<\/pre>\n<pre class=\"lang:sh decode:true \" >$ sudo pip3 install smbus2<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1. \u6982\u8981 I2C : Inter-Integrated Circuit\u3002\uff12\u7dda\u5f0f\u30b7\u30ea\u30a2\u30eb\u30fb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002 SMBus : System Management Bus\u3002 I2C\u306e\u6d3e\u751f\u4ed5\u69d8\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[86],"class_list":["post-3527","post","type-post","status-publish","format-standard","hentry","category-memo","tag-raspi"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=3527"}],"version-history":[{"count":7,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3527\/revisions"}],"predecessor-version":[{"id":3547,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3527\/revisions\/3547"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=3527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=3527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=3527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}