{"id":401,"date":"2011-10-31T22:03:10","date_gmt":"2011-10-31T13:03:10","guid":{"rendered":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/?page_id=401"},"modified":"2012-10-20T06:28:50","modified_gmt":"2012-10-19T21:28:50","slug":"7segduino-application-4-8digit","status":"publish","type":"page","link":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/aruino\/7segduino\/7segduino-application-4-8digit\/","title":{"rendered":"<!--:ja-->7segduino Application (4) 8\u6841\u5316<!--:--><!--:en-->7segduino 8-digit<!--:-->"},"content":{"rendered":"<p><!--:ja-->7segduino\u306f\u6a19\u6e96\u3067\uff14\u6841\u3067\u3059\u304c\u3001\u81ea\u5206\u3067\u914d\u7dda\u3059\u308b\u3053\u3068\u3067\uff18\u6841\u5316\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\uff18\u6841\u5316\u306e\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>\n<p><div id=\"attachment_396\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP6123.jpg\"><img aria-describedby=\"caption-attachment-396\" loading=\"lazy\" class=\"size-medium wp-image-396\" title=\"7segduino 8digits\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP6123-400x266.jpg\" alt=\"8\u6841\u306e7segduino\" width=\"400\" height=\"266\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP6123-400x266.jpg 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP6123.jpg 1024w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-396\" class=\"wp-caption-text\">8\u6841\u306e7segduino<\/p><\/div><\/h2>\n<h2>1. \u30d1\u30fc\u30c4<\/h2>\n<p>7segduino\u30ad\u30c3\u30c8\u4e00\u5f0f<\/p>\n<p>\u540c\u8272\u306eLED 1\u500b<\/p>\n<h2>2. \u7d44\u307f\u7acb\u3066\u65b9<\/h2>\n<p>\u30fb4\u6841\u306e\u666e\u901a\u306e7segduino\u3092\u7d44\u307f\u7acb\u3066\u3066\u3001\u52d5\u4f5c\u306e\u78ba\u8a8d\u3092\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u30fb4\u6841\u306e7seg\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u63a5\u7740\u3057\u307e\u3059\u3002\u305d\u306e\u969b\u306b\u6b63\u9762\u304b\u3089\u898b\u3066\u53f3\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u6301\u3063\u3066\u6765\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u30fb\u6b21\u306e\u5b9f\u614b\u914d\u7dda\u56f3\u306b\u5f93\u3063\u3066\u914d\u7dda\u3057\u307e\u3059\u3002<\/p>\n<div id=\"attachment_400\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/7segduino-curcuit.png\"><img aria-describedby=\"caption-attachment-400\" loading=\"lazy\" class=\"size-medium wp-image-400\" title=\"7segduino-curcuit\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/7segduino-curcuit-400x194.png\" alt=\"7segdgino 8\u6841\u914d\u7dda\u56f3\" width=\"400\" height=\"194\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/7segduino-curcuit-400x194.png 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/7segduino-curcuit.png 598w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-400\" class=\"wp-caption-text\">7segdgino 8\u6841\u914d\u7dda\u56f3<\/p><\/div>\n<h2>3. \u5229\u7528\u65b9\u6cd5<\/h2>\n<p>sseg\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\uff18\u6841\u307e\u3067\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u521d\u671f\u5316\u90e8\u5206\u3092\u5909\u66f4\u3059\u308b\u3060\u3051\u3067\u5229\u7528\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\r\n\/*** Hello 7seg 2digit\r\n\r\nSEG-A(11)\u00a0\u00a0\u00a0 PD4\u00a0\u00a0\u00a0 4\r\nSEG-B(7)\u00a0\u00a0\u00a0\u00a0 PB0\u00a0\u00a0\u00a0 8\r\nSEG-C(4)\u00a0\u00a0\u00a0\u00a0 PB3\u00a0\u00a0\u00a0 11\r\nSEG-D (2)\u00a0\u00a0\u00a0 PB5\u00a0\u00a0\u00a0 13\r\nSEG-E(1)\u00a0\u00a0\u00a0\u00a0 PC0\u00a0\u00a0\u00a0 14\r\nSEG-F(10)\u00a0\u00a0\u00a0 PD2\u00a0\u00a0\u00a0 2\r\nSEG-G(5)\u00a0\u00a0\u00a0\u00a0 PB2\u00a0\u00a0\u00a0 10\r\nSEG-DP(3)\u00a0\u00a0\u00a0 PB4\u00a0\u00a0\u00a0 12\r\n\r\nDIG-1(12)\u00a0\u00a0\u00a0 PD3\u00a0\u00a0\u00a0 3\r\nDIG-2(9)\u00a0\u00a0\u00a0\u00a0 PD6\u00a0\u00a0\u00a0 6\r\nDIG-3(8)\u00a0\u00a0\u00a0\u00a0 PD7\u00a0\u00a0\u00a0 7\r\nDIG-4(6)\u00a0\u00a0\u00a0\u00a0 PB1\u00a0\u00a0\u00a0 9\r\nDIG-5(12)\u00a0\u00a0\u00a0 PC1\u00a0\u00a0\u00a0 15\r\nDIG-6(9)\u00a0\u00a0\u00a0\u00a0 PC2\u00a0\u00a0\u00a0 16\r\nDIG-7(8)\u00a0\u00a0\u00a0\u00a0 PC3\u00a0\u00a0\u00a0 17\r\nDIG-8(6)\u00a0\u00a0\u00a0\u00a0 PC4\u00a0\u00a0\u00a0 18\r\n *\/\r\n\r\n#include &lt;Sseg.h&gt;\r\n\r\nSseg mySseg = Sseg(4, 8, 11, 13, 14, 2, 10, 12, 3, 6, 7, 9, 15, 16, 17, 18);\r\n\r\nuint8_t hello&#x5B;] = {\r\n 0b00000000,\r\n 0b00000000,\r\n 0b00000000,\r\n 0b00000000,\r\n 0b01101110, \/\/ H\r\n 0b10011110, \/\/ E\r\n 0b00011100, \/\/ L\r\n 0b00011100, \/\/ L\r\n 0b00111010, \/\/ o\r\n 0b00000000, \/\/\r\n NUM_PAT_7,\u00a0 \/\/ 7\r\n 0b10110110, \/\/ S\r\n NUM_PAT_E,\u00a0 \/\/ E\r\n 0b11110110, \/\/ G\r\n 0b00000001\r\n};\r\n\r\nint p = 0;\r\nvoid setup()\r\n{\r\n mySseg.begin();\r\n}\r\n\r\n#define OVERWRAP(a, x) (((x) &lt; sizeof(a)) ? (a&#x5B;(x)]) : a&#x5B;((x) - sizeof(a))])\r\nvoid loop()\r\n{\r\n uint8_t i;\r\n if ((++p) &gt; sizeof(hello))\r\n p = 0;\r\n for (i = 0 ; i &lt;4; i++) {\r\n mySseg.writeRawData(\r\n OVERWRAP(hello, p),\r\n OVERWRAP(hello, p+1),\r\n OVERWRAP(hello, p+2),\r\n OVERWRAP(hello, p+3),\r\n OVERWRAP(hello, p+4),\r\n OVERWRAP(hello, p+5),\r\n OVERWRAP(hello, p+6),\r\n OVERWRAP(hello, p+7));\r\n }\r\n\r\n mySseg.updateWithDelay(300);\r\n\r\n}\r\n\r\n<\/pre>\n<h2>4. \u5236\u9650\u4e8b\u9805<\/h2>\n<p>A1-A4\u3092\u5229\u7528\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001\u6b8b\u308a\u3067\u4f7f\u3048\u308b\u30d4\u30f3\u304c\uff12\u672c\u306e\u307f\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><div id=\"attachment_398\" style=\"width: 410px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP61261.jpg\"><img aria-describedby=\"caption-attachment-398\" loading=\"lazy\" class=\"size-medium wp-image-398\" title=\"7segduino 8digits \u88cf\u9762\" src=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP61261-400x266.jpg\" alt=\"7segduino 8digits \u88cf\u9762\" width=\"400\" height=\"266\" srcset=\"http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP61261-400x266.jpg 400w, http:\/\/morecatlab.akiba.coocan.jp\/lab\/wp-content\/uploads\/2011\/10\/IMGP61261.jpg 1024w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><p id=\"caption-attachment-398\" class=\"wp-caption-text\">7segduino 8digits \u88cf\u9762<\/p><\/div><!--:--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>7segduino\u306f\u6a19\u6e96\u3067\uff14\u6841\u3067\u3059\u304c\u3001\u81ea\u5206\u3067\u914d\u7dda\u3059\u308b\u3053\u3068\u3067\uff18\u6841\u5316\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002 \uff18\u6841\u5316\u306e\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 1. \u30d1\u30fc\u30c4 7segduino\u30ad\u30c3\u30c8\u4e00\u5f0f \u540c\u8272\u306eLED 1\u500b 2. \u7d44\u307f\u7acb\u3066\u65b9 \u30fb4\u6841\u306e\u666e\u901a\u306e7segd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":79,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/401"}],"collection":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/comments?post=401"}],"version-history":[{"count":5,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/401\/revisions"}],"predecessor-version":[{"id":405,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/401\/revisions\/405"}],"up":[{"embeddable":true,"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/pages\/79"}],"wp:attachment":[{"href":"http:\/\/morecatlab.akiba.coocan.jp\/lab\/index.php\/wp-json\/wp\/v2\/media?parent=401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}