{"id":252,"date":"2016-09-08T08:00:44","date_gmt":"2016-09-07T23:00:44","guid":{"rendered":"http:\/\/spiralware.jp\/blog\/?p=252"},"modified":"2016-09-08T08:00:44","modified_gmt":"2016-09-07T23:00:44","slug":"%ef%bc%93%ef%bc%96%ef%bc%90%e5%ba%a6%e3%82%ab%e3%83%a1%e3%83%a9%e3%82%92%e8%87%aa%e4%bd%9c%e3%81%97%e3%82%88%e3%81%86%e3%81%a8%e3%81%97%e3%81%a6%e3%80%81%ef%bc%91%ef%bc%98%ef%bc%90%e5%ba%a6%e3%81%a8-4","status":"publish","type":"post","link":"https:\/\/spiralware.jp\/blog\/archives\/252","title":{"rendered":"\uff13\uff16\uff10\u5ea6\u30ab\u30e1\u30e9\u3092\u81ea\u4f5c\u3057\u3088\u3046\u3068\u3057\u3066\u3001\uff11\uff18\uff10\u5ea6\u3068\u3044\u3046\u985b\u672b\u306b (4 of 4)"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/spiralware.jp\/blog\/?p=250\">\u524d\u56de<\/a>\u304b\u3089\u306e\u7d9a\u304d\u3067\u3059\u3002<\/p>\n<h3>Edison\u306eI2C\u30cf\u30fc\u30c9\u3092\u4f7f\u308f\u305a\u306bI2C\u901a\u4fe1\u3059\u308b<\/h3>\n<p>\u6570\u65e5\u9593\u305a\u3063\u3068\u6697\u3044\u6c17\u6301\u3061\u3067\u30e2\u30e4\u30e2\u30e4\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3075\u3068\u3001\u5168\u304f\u5225\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u601d\u3044\u3064\u304d\u307e\u3057\u305f\u3002Edison\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308bI2C\u30cf\u30fc\u30c9\u3092\u4f7f\u3046\u306e\u3092\u3084\u3081\u3066\u3001\u6c4e\u7528\u306e\u30c7\u30b8\u30bf\u30ebIO\u30d4\u30f3\u4e0a\u3067I2C\u901a\u4fe1\u3059\u308b\u51e6\u7406\u3092\u81ea\u524d\u3067\u5b9f\u88c5\u3059\u308b\u306e\u3067\u3059\u3002\uff08Bit Banging\u3068\u547c\u3070\u308c\u308b\u624b\u6cd5\u3067\u3059\uff09<\/p>\n<p>\u57fa\u672c\u7684\u306a\u5b9f\u88c5\u306f\u601d\u3063\u305f\u307b\u3069\u96e3\u3057\u304f\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3044\u3056\u52d5\u304b\u3057\u3066\u307f\u308b\u3068\u3001\u3053\u3053\u306b\u3082\u4e00\u3064\u843d\u3068\u3057\u7a74\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u901a\u5e38\u3001\u6c4e\u7528\u306eI\/O\u30d4\u30f3\u306f\u3001\u30c7\u30fc\u30bf\u306e\u65b9\u5411\uff08INPUT\/OUTPUT\uff09\u3092\u8a2d\u5b9a\u3057\u3066\u304b\u3089\u3001\u96fb\u5727\u30ec\u30d9\u30eb(HIGH\/LOW\uff09\u3092\u8aad\u307f\u66f8\u304d\u3057\u307e\u3059\u3002\u4eca\u56de\u306fI2C\u901a\u4fe1\u3092\u30a8\u30df\u30e5\u30ec\u30fc\u30c8\u3059\u308b\u305f\u3081\u3001\u30c7\u30fc\u30bf\u65b9\u5411\u3092\u983b\u7e41\u306b\u5207\u308a\u66ff\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002\uff08I2C\u306f\u3001\u30c7\u30fc\u30bf\u306e\u9001\u53d7\u4fe1\u3092\uff11\u672c\u306e\u7dda\u3067\u307e\u304b\u306a\u3044\u307e\u3059\uff09<\/p>\n<p>\u30c7\u30fc\u30bf\u65b9\u5411\u306e\u5207\u308a\u66ff\u3048\u306fArduino\u4e92\u63db\u30e9\u30a4\u30d6\u30e9\u30ea\u306epinMode\u95a2\u6570\u3092\u4f7f\u3063\u3066\u884c\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3068\u3001\u306a\u3093\u3068\u3001\u5207\u308a\u66ff\u3048\u3068\u95a2\u4fc2\u306a\u3044\u300c\u4ed6\u306eIO\u30d4\u30f3\u300d\u306e\u96fb\u5727\u304c\u4e00\u77ac\u4e0a\u4e0b\u306b\u632f\u308c\u307e\u3059\u3002I2C\u30d7\u30ed\u30c8\u30b3\u30eb\u306b\u6e96\u3058\u305f\u6ce2\u5f62\u3092\u4f5c\u308b\u305f\u3081\u306b\u82e6\u52b4\u3057\u3066\u3044\u308b\u4e2d\u3067\u3001\u3053\u3093\u306a\u526f\u4f5c\u7528\u304c\u3042\u3063\u3066\u306f\u56f0\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/spiralware.jp\/blog\/wp-content\/uploads\/2016\/08\/bit_bang_error.jpg\" rel=\"attachment wp-att-244\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-244\" src=\"https:\/\/spiralware.jp\/blog\/wp-content\/uploads\/2016\/08\/bit_bang_error.jpg\" alt=\"\u60f3\u5b9a\u5916\u306e\u30af\u30ed\u30c3\u30af\u751f\u6210\" width=\"500\" height=\"334\" srcset=\"https:\/\/spiralware.jp\/blog\/wp-content\/uploads\/2016\/08\/bit_bang_error.jpg 500w, https:\/\/spiralware.jp\/blog\/wp-content\/uploads\/2016\/08\/bit_bang_error-300x200.jpg 300w\" sizes=\"auto, (max-width: 500px) 85vw, 500px\" \/><\/a><\/p>\n<p>\u8a66\u884c\u932f\u8aa4\u3057\u305f\u7d50\u679c\u3001\u4eca\u56de\u306f\u3001pinMode\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u30bf\u30a4\u30df\u30f3\u30b0\u3092\u8abf\u6574\u3059\u308b\u3053\u3068\u3067\u3001\u306a\u3093\u3068\u304b\u526f\u4f5c\u7528\u3092\u6291\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3>Bit Banging\u304c\u6551\u3044\u306e\u795e\u3060\u3063\u305f<\/h3>\n<p>Bit Banging\u306e\u5b9f\u88c5\u304c\u7d42\u308f\u3063\u305f\u3068\u3053\u308d\u3067\u3001\u30c7\u30e2\u30d7\u30ed\u30b0\u30e9\u30e0\u306eI2C\u51e6\u7406\u3092\u7f6e\u304d\u63db\u3048\u3066\u3001\u52d5\u4f5c\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3069\u3046\u305b\u30c0\u30e1\u3067\u3057\u3087\u30fb\u30fb\u30fb\u304f\u3089\u3044\u306b\u601d\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u306a\u3093\u3068\u306a\u3093\u3068\u3001\u5168\u3066\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u66f8\u304d\u8fbc\u307f\u306b\u6210\u529f\u3057\u307e\u3057\u305f\uff01<\/p>\n<p>\u7d50\u5c40\u3001Edison\u306eI2C\u30cf\u30fc\u30c9\u3068ArduCAM\u306e\u76f8\u6027\u304c\u60aa\u304b\u3063\u305f\u3093\u3067\u3059\u306d\u30fb\u30fb\u30fb\u3002<\/p>\n<p>\u30ab\u30e1\u30e9\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\uff11\u53f0\u7e4b\u3052\u305f\u72b6\u614b\u3067\u3046\u307e\u304f\u3044\u3063\u305f\u306e\u3067\u3001\u4eca\u5ea6\u306f\u3001\uff12\u53f0\u7e4b\u3052\u3066\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u8a66\u3057\u305f\u7d50\u679c\u30012kHz\u7a0b\u5ea6\u306e\u30af\u30ed\u30c3\u30af\u5468\u6ce2\u6570\u306a\u3089\u3001\u8907\u6570\u53f0\u7e4b\u3044\u3067\u3082\u3046\u307e\u304f\u3044\u304f\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002\uff0810kHz\u3060\u3068\u3001\u4e00\u65b9\u306f\u6b63\u5e38\u306b\u52d5\u4f5c\u3059\u308b\u3082\u306e\u306e\u3001\u4ed6\u65b9\u306f\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u8a2d\u5b9a\u306b\u5931\u6557\u3057\u3066\u5909\u306a\u753b\u50cf\u304c\u51fa\u529b\u3055\u308c\u305f\u308a\u3057\u307e\u3057\u305f\uff09<\/p>\n<p>2kHz\u3068\u8a00\u3046\u3068\u3001I2C\u4ed5\u69d8\u306e\u4e2d\u3067\u6700\u3082\u4f4e\u901f\u306a\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u30e2\u30fc\u30c9\u306e100kHz\u3088\u308a50\u500d\u9045\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u3068\u306f\u3044\u3048\u3001\u4eca\u56de\u306e\u81ea\u4f5c\u30ab\u30e1\u30e9\u306b\u304a\u3044\u3066\u306f\u3001I2C\u901a\u4fe1\u306f\u30ab\u30e1\u30e9\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u521d\u671f\u5316\u6642\u306b\uff11\u56de\u8d70\u308b\u3060\u3051\u3067\u3059\u3002\u521d\u671f\u5316\u5f8c\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u5236\u5fa1\u3084\u753b\u50cf\u8aad\u307f\u53d6\u308a\u306f\u9ad8\u901f\u306aSPI\u901a\u4fe1\u3067\u5236\u5fa1\u3055\u308c\u308b\u306e\u3067\u3001\u5b9f\u7528\u4e0a\u306e\u554f\u984c\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3>\u3088\u3046\u3084\u304f\u3001\u81ea\u4f5c\u30ab\u30e1\u30e9\u304c\u307e\u3068\u3082\u306b\u52d5\u304f<\/h3>\n<p>\u5e7e\u591a\u306e\u56f0\u96e3\u3092\u4e57\u308a\u8d8a\u3048\u3066\u3001\u3088\u3046\u3084\u304fArduCAM\u304cEdison\u4e0a\u3067\u52d5\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u52d5\u304b\u3057\u59cb\u3081\u305f\u9803\u306f\u3001Edison\u304b\u3089SD\u30ab\u30fc\u30c9\u3092\u629c\u304d\u3001\u81ea\u6a5f\u306eMAC OS X\u306b\u5dee\u3057\u3001\u753b\u50cf\u3092\u78ba\u8a8d\u3057\u3001Edison\u306b\u518d\u3073\u5dee\u3057\u76f4\u3059\u30fb\u30fb\u30fb\u3068\u3044\u3046\u4f5c\u696d\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305f\u3060\u3001\u3053\u308c\u3092\u6570\u5341\u56de\u3082\u7e70\u308a\u8fd4\u3057\u3066\u3044\u308b\u3046\u3061\u3001\u3044\u3044\u52a0\u6e1b\u9762\u5012\u306b\u306a\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001<a href=\"http:\/\/expressjs.com\">Express<\/a>\u3068\u3044\u3046node.js\u7528\u306eWeb\u30b5\u30fc\u30d0\u30fcAPI\u3092\u4f7f\u3063\u3066\u3001SD\u30ab\u30fc\u30c9\u306eJPEG\u753b\u50cf\u3092\u81ea\u6a5f\u306eWeb\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u76f4\u63a5\u898b\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<blockquote><p>$ vi app.js<br \/>\nvar express = require(&#8216;express&#8217;);<br \/>\nvar app = express();<\/p>\n<p>\/\/ Edison\u306f\u3001SD Card \u3092 \/media\/sdcard\u306b\u30de\u30a6\u30f3\u30c8\u3059\u308b<br \/>\napp.use(&#8216;\/sdcard&#8217;, express.static(&#8216;\/media\/sdcard&#8217;));<\/p>\n<p>app.listen(3000, function () {<br \/>\nconsole.log(&#8216;Example app listening on port 3000!&#8217;);<br \/>\n});<\/p>\n<p>$ node app.js \u00a0 #web\u30b5\u30fc\u30d0\u8d77\u52d5<\/p><\/blockquote>\n<p>\u7279\u306b\u30c8\u30e9\u30d6\u308b\u3053\u3068\u306a\u304f\u3001\u3042\u3063\u3055\u308a\u6210\u529f\u3002I2C\u306e\u82e6\u52b4\u3092\u601d\u3048\u3070\u3001\u307e\u3055\u306b\u77ac\u6bba\u3067\u3059\u3002\u3053\u3046\u3044\u3046\u3053\u3068\u304c\u30b5\u30af\u30c3\u3068\u3067\u304d\u308b\u3068\u3053\u308d\u306b\u3001Edison\u306e\u51c4\u3055\u3092\u611f\u3058\u307e\u3059\u3002<\/p>\n<h3>\u4eca\u5f8c\u306e\u4e88\u5b9a<\/h3>\n<p>\u5192\u982d\u3067\u3082\u8ff0\u3079\u305f\u901a\u308a\u3001\u672c\u5f53\u306b\u3084\u308a\u305f\u3044\u4e8b\u306f\u30ab\u30e1\u30e9\u304b\u3089\u753b\u50cf\u51fa\u529b\u3057\u305f\u5148\u306e\u51e6\u7406\u306a\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u3001\u753b\u50cf\u51fa\u529b\u307e\u3067\u3067\u529b\u5c3d\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3067\u3082\u3001\u3053\u308c\u3067\u3088\u3046\u3084\u304f\u30b9\u30bf\u30fc\u30c8\u30e9\u30a4\u30f3\u306b\u7acb\u3066\u307e\u3057\u305f\u3002\u3053\u308c\u304b\u3089\u8272\u3005\u8a66\u3057\u3066\u307f\u3066\u3001\u968f\u6642\u3001\u672c\u30d6\u30ed\u30b0\u306b\u7d50\u679c\u5831\u544a\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; \u524d\u56de\u304b\u3089\u306e\u7d9a\u304d\u3067\u3059\u3002 Edison\u306eI2C\u30cf\u30fc\u30c9\u3092\u4f7f\u308f\u305a\u306bI2C\u901a\u4fe1\u3059\u308b \u6570\u65e5\u9593\u305a\u3063\u3068\u6697\u3044\u6c17\u6301\u3061\u3067\u30e2\u30e4\u30e2\u30e4\u3057\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u3075\u3068\u3001\u5168\u304f\u5225\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u601d\u3044\u3064\u304d\u307e\u3057\u305f\u3002Edison\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308bI2C\u30cf\u30fc\u30c9\u3092 &hellip; <a href=\"https:\/\/spiralware.jp\/blog\/archives\/252\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\uff13\uff16\uff10\u5ea6\u30ab\u30e1\u30e9\u3092\u81ea\u4f5c\u3057\u3088\u3046\u3068\u3057\u3066\u3001\uff11\uff18\uff10\u5ea6\u3068\u3044\u3046\u985b\u672b\u306b (4 of 4)&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-252","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/posts\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":0,"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/posts\/252\/revisions"}],"wp:attachment":[{"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/media?parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/categories?post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spiralware.jp\/blog\/wp-json\/wp\/v2\/tags?post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}