
{"id":4883,"date":"2016-10-02T17:08:00","date_gmt":"2016-10-02T08:08:00","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=4883"},"modified":"2018-09-07T14:57:01","modified_gmt":"2018-09-07T05:57:01","slug":"wroom02%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f%e8%b5%a4%e5%a4%96%e7%b7%9a%e3%83%aa%e3%83%a2%e3%82%b3%e3%83%b3-%e3%81%9d%e3%81%ae2","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=4883","title":{"rendered":"WROOM02\u3092\u4f7f\u3063\u305f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3 \u305d\u306e2"},"content":{"rendered":"<h2>\u6982\u8981<\/h2>\n<p>\u524d\u56de\u306e\u3001<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=4800\">WROOM02\u3092\u4f7f\u3063\u305f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3 \u305d\u306e1<\/a> \u3067IrLED\u3092\u4f7f\u3063\u305f\u56de\u8def\u3084\u3001\u5bb6\u96fb\u7528\u30ea\u30e2\u30b3\u30f3\u306e\u30b3\u30de\u30f3\u30c9\u30b3\u30fc\u30c9\u306e\u9001\u51fa\u304c\u3046\u307e\u304f\u3044\u3063\u305f\uff08\u3088\u3046\u3067\u3042\u308b\uff09\u3002\u305f\u3060\u3001\u3044\u3061\u3044\u3061\u30ea\u30e2\u30b3\u30f3\u306e\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u66f8\u3044\u3066\u9001\u4fe1\u3059\u308b\u306e\u3067\u306f\u9762\u5012\u3053\u306e\u4e0a\u306a\u3044\u306e\u3067\u3001\u30dc\u30bf\u30f3\u3092\u305d\u308c\u3089\u3057\u304f\u4e26\u3079\u305fhtml\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092WROOM02\u4e0a\u3067\u52d5\u4f5c\u3059\u308bweb\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u8aad\u307f\u51fa\u3057\u3066\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3055\u308c\u308b\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001IrLED\u304b\u3089\u30b3\u30de\u30f3\u30c9\u30b3\u30fc\u30c9\u3092\u9001\u51fa\u3059\u308b\u305f\u3081\u306eURI\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u308b\u3088\u3046\u306b\u3059\u308b\u3002\u305d\u3046\u3057\u3066\u304a\u3051\u3070\u3001PC\u3067\u3082\u30b9\u30de\u30db\u3067\u3082\u3001WIFI\u63a5\u7d9a\u304c\u53ef\u80fd\u306a\u30c7\u30d0\u30a4\u30b9\u304b\u3089\u64cd\u4f5c\u3067\u304d\u308b\u3002<\/p>\n<h2>WROOM02\u306eSPIFFS\u306e\u5229\u7528<\/h2>\n<p>\u3042\u307e\u308ahtml\u30d5\u30a1\u30a4\u30eb\u306b\u51dd\u3063\u3066\u3082\u3057\u3087\u3046\u304c\u306a\u3044\u306e\u3067\u3001\u3042\u3063\u3055\u308a\u3057\u305f\u3082\u306e\u306b\u3057\u305f\u3002\u305f\u3060\u3001\u4ee5\u524d\u3084\u3063\u305f\u3088\u3046\u306bhtml\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u3092\u6587\u5b57\u5217\u306b\u3057\u3066\u30b9\u30b1\u30c3\u30c1\u306b\u57cb\u3081\u8fbc\u3080\u306e\u3067\u306f\u82b8\u304c\u306a\u3044\u306e\u3067\u3001WROOM02\u306eSPIFFS\u3068\u3044\u3046\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3001\u5bfe\u8c61\u306e\u5bb6\u96fb\u88fd\u54c1\u3054\u3068\u306bhtml\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308a\u3001WROOM02\u5185\u90e8\u306b\u683c\u7d0d\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u8868\u793a\u3057\u305f\u3044html\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u5bfe\u8c61\u3068\u3057\u305f\u3044\u5bb6\u96fb\u7528\u306e\u30ea\u30e2\u30b3\u30f3\u3082\u3069\u304d\u304c\u8868\u793a\u3055\u308c\u308b\u308f\u3051\u3067\u3042\u308b\u3002<\/p>\n<p>WROOM02\u306b\u306f\u5408\u8a084MBytes\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u304c\u7a4d\u307e\u308c\u3066\u3044\u308b\u304c\u3001\u4eca\u307e\u3067\u4f5c\u3063\u305f\u3088\u3046\u306a\u69cb\u6210\u3067\u306f\u3001\u30b9\u30b1\u30c3\u30c1\u7528\u306e\u9818\u57df\u304c1MBytes\u5f31\u3067\u3001\u6b8b\u308a\u306f\u307b\u3068\u3093\u3069\u4f7f\u308f\u308c\u3066\u3044\u306a\u3044\u3002\u3053\u306e\u7a7a\u3044\u3066\u3044\u308b\u9818\u57df\u3092\u4f7f\u3063\u305f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306e\u3053\u3068\u3092\u3001<em>SPIFFS (SPI Flash File System)<\/em> \u3068\u547c\u3093\u3067\u3044\u308b\u3002<br \/>\nArduino IDE\u3067\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u3068\u3057\u3066 <strong><em>Generic ESP8266 Module<\/em><\/strong>\u00a0\u3092\u9078\u629e\u3057\u3066\u3044\u308b\u5834\u5408\u3001Flash Size \u3092\u6307\u5b9a\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067 <strong><em>4M(1M SPIFFS)<\/em><\/strong> \u3068\u3057\u3066\u3044\u308b\u304c\u3001\u3053\u308c\u306fSPIFFS\u7528\u306b1MBytes\u78ba\u4fdd\u3057\u307e\u3059\u3001\u3068\u3044\u3046\u610f\u5473\u3060\u308d\u3046\u3002<\/p>\n<p>SPIFFS\u9818\u57df\u3078\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u8ee2\u9001\u306f\u3001Arduino IDE\u306b\u7d44\u307f\u8fbc\u3080\u3001<a href=\"https:\/\/github.com\/esp8266\/arduino-esp8266fs-plugin\"><em>ESP8266 Sketch Data Uploader<\/em> \u3068\u3044\u3046\u30d7\u30e9\u30b0\u30a4\u30f3<\/a>\u3092\u7528\u3044\u3066\u884c\u3046\uff08\u8a73\u3057\u304f\u306f\u30ea\u30f3\u30af\u5148\u3092\u53c2\u7167\uff09\u3002<br \/>\n\u3053\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u6a5f\u80fd\u306f\u3001\u30b9\u30b1\u30c3\u30c1\u30c7\u30a3\u30ec\u30af\u30c8\u30ea( \u30b9\u30b1\u30c3\u30c1.ino \u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u306b &#8220;<em>data<\/em>&#8221; \u3068\u3044\u3046\u540d\u524d\u306e\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308c\u3070\u3001\u305d\u306e\u4e2d\u8eab\u3092\u305d\u3063\u304f\u308a\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u5185\u306e\u30a4\u30e1\u30fc\u30b8\u306b\u5909\u63db\u3057\u3001\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u3092\u7d4c\u7531\u3057\u3066WROOM02\u306b\u9001\u308a\u8fbc\u307f\u307e\u3059\u3088\u3001\u3068\u3044\u3046\u3082\u306e\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u4f5c\u6210\u3059\u308b\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u30a4\u30e1\u30fc\u30b8\u306f\u3001<em>data<\/em>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u304a\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u3067\u306f\u306a\u304f\u3001SPIFFS\u9818\u57df\u306e\u5927\u304d\u3055\uff08\u3046\u3061\u306e\u5834\u5408\u306f1M SPIFFS\u306a\u306e\u3067\u7d041MBytes\uff09\u306b\u306a\u308b\u3088\u3046\u3060\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/MKSPIFFS.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4990\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/MKSPIFFS-552x454.png\" alt=\"mkspiffs\" width=\"552\" height=\"454\" \/><\/a><\/p>\n<p>SPIFFS\u306b\u8ee2\u9001\u3059\u308b\u969b\u306b\u306f\u3001WROOM02\u5074\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u8ee2\u9001\u5f85\u3061\u306b\u3057\u305f\u72b6\u614b\u3067\u3001\u30c4\u30fc\u30eb\u30e1\u30cb\u30e5\u30fc\u304b\u3089 <em><strong>ESP8266 Sketch Data Upload<\/strong><\/em> \u3092\u9078\u629e\u3059\u308b\u3060\u3051\u3067\u3088\u3044\u3002\u306a\u304a\u3001\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u304c\u958b\u3044\u3066\u3044\u308b\u3068\u5931\u6557\u3059\u308b\u306e\u3067\u6ce8\u610f\u3002<\/p>\n<p>\u30b9\u30b1\u30c3\u30c1\u304b\u3089SPIFFS\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u969b\u306b\u306f<em>&#8220;FS.h<\/em>&#8220;\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3059\u308b\u3002\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306f\u3001\u00a0<em>&#8230;\\esp8266\\2.3.0\\libraries\\ESP8266WebServer\\examples\\FSBrowser\u00a0<\/em>\u3092\u53c2\u8003\u306b\u3057\u305f\u3002<br \/>\n\u306a\u304a\u3001\u8ee2\u9001\u524d\u306e<em>data<\/em> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3001SPIFFS\u3067\u306e\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea (&#8220;\/&#8221;) \u3068\u306a\u308b\u3002data\u5185\u306b\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308b\u5834\u5408\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u9020\u3092\u7dad\u6301\u3057\u305f\u307e\u307e\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u308c\u308b\u3002Windows\u3067\u30b9\u30b1\u30c3\u30c1\u3092\u66f8\u3044\u3066\u3044\u308b\u5834\u5408\u3082\u3001SPIFFS\u5185\u3067\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30bb\u30d1\u30ec\u30fc\u30bf\u306f&#8221;\/&#8221;\u3068\u306a\u308b\u3002\u307e\u3042\u3001&#8221;\\&#8221; \u3063\u3066\u3053\u3068\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30ea\u30e2\u30b3\u30f3\u6a5f\u80fd\u306e\u30c6\u30b9\u30c8\u306e\u7d9a\u304d\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30c6\u30ec\u30d3\u7528\u3068\u30a8\u30a2\u30b3\u30f3\u7528\u306e2\u3064\u306ehtml\u30d5\u30a1\u30a4\u30eb\u3068\u3001\u5171\u901a\u306ejavaScript\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u3059\u3079\u3066data\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u76f4\u4e0b\uff08SPIFFS\u3067\u306e&#8221;\/&#8221;\u76f4\u4e0b\uff09\u306b\u914d\u7f6e\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<h2>\u30b9\u30b1\u30c3\u30c1\u306b\u3064\u3044\u3066<\/h2>\n<p>WROOM02\u306b\u9001\u308a\u8fbc\u3080\u30b9\u30b1\u30c3\u30c1\u306f\u3001SPIFFS\u304b\u3089\u306e\u6307\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u3060\u3059\u90e8\u5206\u3092\u8ffd\u52a0\u3057\u305f\u7a0b\u5ea6\u3067\u3001\u524d\u56de\u306e\u3082\u306e\u3068\u3042\u307e\u308a\u5909\u308f\u3089\u306a\u3044\u3002\u304a\u3082\u306a\u76f8\u9055\u70b9\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<h6>#include &lt;FS.h&gt; \u3092\u8ffd\u52a0\u3002SPIFFS\u3092\u4f7f\u3046\u304b\u3089\u3002<\/h6>\n<h6>void setup(void)\u5185<\/h6>\n<ul>\n<li>\u6700\u521d\u306e\u65b9\u306b\u3001\u00a0SPIFFS\u306e\u4f7f\u7528\u3092\u958b\u59cb\u3059\u308b\u305f\u3081\u306e\u3001\u00a0SPIFFS.begin(); \u3092\u8ffd\u52a0\u3002<\/li>\n<li>server.on(&#8230;) \u3067\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044URI\u304c\u30ea\u30af\u30a8\u30b9\u30c8\u3055\u308c\u305f\u3068\u304d\u3001SPIFFS\u5185\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059\u306e\u3067\u3001<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">server.onNotFound([](){\r\nif(!handleFileRead(server.uri()))\r\nserver.send(404, \"text\/plain\", \"FileNotFound\");\r\n});\r\n<\/pre>\n<p style=\"padding-left: 30px;\">\u3092\u8ffd\u52a0\u3002handleFileRead() \u306e\u4e2d\u8eab\u306b\u3064\u3044\u3066\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u306e FSBrowser.ino \u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<h2>\u30ea\u30e2\u30b3\u30f3\u98a8html\u30d5\u30a1\u30a4\u30eb<\/h2>\n<h4>\u30c6\u30ec\u30d3\u7528<\/h4>\n<p>\u4ee5\u4e0b\u306b\u3001\u4eca\u56de\u3068\u308a\u3042\u3048\u305a\u66f8\u3044\u305f\u30c6\u30ec\u30d3\u7528\u30ea\u30e2\u30b3\u30f3\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306ehtml\u30d5\u30a1\u30a4\u30eb(regza.html) \u3092\u793a\u3059\u3002<\/p>\n<pre class=\"lang:js decode:true\" title=\"regza.html\">&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=\"utf-8\"&gt;\r\n&lt;script type=\"text\/javascript\" src=\"funcs.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\nwindow.onload=function(){ return setup('N'); }\r\n\r\nvar params = {\r\n\t'\u96fb\u6e90' : '40 bf 12 ed',\r\n\t'\u5730\u30c7\u30b8' : '40 bf 7a 85',\t\r\n\t'BS' : '40 bf 7c 83',\t\r\n\t'CH1' : '40 bf 01 fe',\t\r\n\t'CH2' : '40 bf 02 fd',\t\r\n\t'CH3' : '40 bf 03 fc',\t\r\n\t'CH4' : '40 bf 04 fb',\t\r\n\t'CH5' : '40 bf 05 fa',\t\r\n\t'CH6' : '40 bf 06 f9',\t\r\n\t'CH7' : '40 bf 07 f8',\t\r\n\t'CH8' : '40 bf 08 f7',\t\r\n\t'CH9' : '40 bf 09 f6',\t\r\n\t'CH10' : '40 bf 0a f5',\t\r\n\t'CH11' : '40 bf 0b f4',\t\r\n\t'CH12' : '40 bf 0c f3',\r\n\t'C_UP' : '40 bf 1b e4',\r\n\t'V_UP' : '40 bf 1a e5',\r\n\t'a1' : '',\r\n\t'C_DOWN' : '40 bf 1f e0',\r\n\t'V_DOWN' : '40 bf 1e e1',\r\n\t'a2' : '',\r\n\t'\u753b\u9762\u8868\u793a' : '40 bf 1c e3',\r\n\t'\u6d88\u97f3' : '40 bf 10 ef'\r\n};\r\n\r\n&lt;\/script&gt;\r\n&lt;style&gt;\r\nbutton { font-size:16px; width: 100px;   }\r\ndiv { width:330px; border: 2px solid coral; margin-left: 10px; padding-top: 10px; text-align:center; line-height: 200%;}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;ESP_IR_SERVER(TV)&lt;\/h1&gt;\r\n&lt;div id='main' \/&gt;\r\n&lt;\/body&gt;&lt;\/html&gt;\r\n<\/pre>\n<p>\u30ea\u30e2\u30b3\u30f3\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u306e\u304b\u3069\u3046\u304b\u306e\u30c6\u30b9\u30c8\u304c\u7b2c\u4e00\u306a\u306e\u3067\u3001\u524d\u56de\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u305f\u9023\u60f3\u914d\u5217\u3068\u3001\u30ea\u30e2\u30b3\u30f3\u7528\u9818\u57df\u306e&lt;div&gt;\u30bf\u30b0\u3067\u69cb\u6210\u3057\u305f\u3002&lt;div&gt;\u30bf\u30b0\u5185\u3078\u306e\u8981\u7d20\u306e\u8ffd\u52a0\u306fjavaScript (funcs.js)\u5185\u3067\u884c\u3063\u3066\u3044\u308b\u3002<\/p>\n<h6><span class=\"crayon-t\">var<\/span> <span class=\"crayon-v\">params<\/span><\/h6>\n<p>\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3\u3092\u8abf\u67fb\u3059\u308b\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u3001\u30ea\u30e2\u30b3\u30f3\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3054\u3068\u306b\u3001\u9001\u51fa\u3055\u308c\u308b\u30b3\u30de\u30f3\u30c9\u30b3\u30fc\u30c9\u309216\u9032\u8868\u8a18\u306e\u6587\u5b57\u5217\u3067\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u8868\u793a\u3057\u3066\u3044\u305f\u3002\u305d\u306e\u5185\u5bb9\u3092\u30b3\u30d4\u30da\u3057\u3066\u9023\u60f3\u914d\u5217\u306e\u5024\u90e8\u5206\u3068\u3057\u3066\u3044\u308b\u3002\u9023\u60f3\u914d\u5217\u306e\u30ad\u30fc\u306b\u306f\u3001\u5bfe\u5fdc\u3059\u308b\u30dc\u30bf\u30f3\u8868\u9762\u306b\u8868\u793a\u3059\u308b\u5185\u5bb9\u3092\u4f7f\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u306a\u304a\u3001\u30ad\u30fc\u540d\u304c&#8217;a&#8217;\u3067\u59cb\u307e\u308b\u30c7\u30fc\u30bf\u306f\u3001\u753b\u9762\u306b\u6539\u884c\uff08&lt;br&gt;\uff09\u3092\u633f\u5165\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3002<\/p>\n<h6>window.onload=function(){ return setup(&#8216;N&#8217;); }<\/h6>\n<p>window.onload \u30a4\u30d9\u30f3\u30c8\u304c\u8d77\u304d\u308b\u3068\u3001funcs.js \u5185\u306esetup(); \u3068\u3044\u3046\u95a2\u6570\u3092\u547c\u3076\u3002\u5f15\u6570\u3068\u3057\u3066\u30ea\u30e2\u30b3\u30f3\u306e\u4fe1\u53f7\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/10\/regza.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5017\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/10\/regza.png\" alt=\"regza\" width=\"379\" height=\"429\" \/><\/a><\/p>\n<p>PC\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3059\u308b\u3053\u3093\u306a\u611f\u3058\u3002\u3088\u304f\u4f7f\u3044\u305d\u3046\u306a\u30dc\u30bf\u30f3\u306b\u7d5e\u3063\u305f\u3002<\/p>\n<h4>\u30a8\u30a2\u30b3\u30f3\u7528<\/h4>\n<p>\u30a8\u30a2\u30b3\u30f3\u7528\u306e\u30ea\u30e2\u30b3\u30f3\u3092\u3061\u3083\u3093\u3068\u4f5c\u308b\u306a\u3089\u3070\u3001\u30dc\u30bf\u30f3\u306b\u5358\u7d14\u306b\u5bfe\u5fdc\u3059\u308b\u4fe1\u53f7\u3092\u9001\u51fa\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u30ea\u30e2\u30b3\u30f3\u5074\u306b\u30a8\u30a2\u30b3\u30f3\u306e\u72b6\u614b\uff08\u904b\u8ee2\u30e2\u30fc\u30c9\u3001\u6e29\u5ea6\u3001\u98a8\u529b\u3001\u30bf\u30a4\u30de\u30fc\u306a\u3069\uff09\u3092\u3057\u3063\u304b\u308a\u7dad\u6301\u3057\u3001\u30dc\u30bf\u30f3\u306e\u64cd\u4f5c\u6642\u306b\u306f\u5185\u90e8\u72b6\u614b\u306b\u57fa\u3065\u3044\u305f\u30b3\u30fc\u30c9\u3092\u9001\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304c\u3001\u4eca\u56de\u306f\u5358\u7d14\u306a\u3082\u306e\u306b\u3057\u305f\u3002<\/p>\n<pre class=\"lang:js decode:true\" title=\"daikin.html\">&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=\"utf-8\"&gt;\r\n&lt;script type=\"text\/javascript\" src=\"funcs.js\"&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\nwindow.onload=function(){ return setup('A'); }\r\n\r\nvar params = {\r\n'\u505c\u6b62' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 38 30 00 a0 00 00 06 60 00 00 c1 80 00 c1',\r\n'\u51b7\u623f\u958b\u59cb' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 a0 00 00 06 60 00 00 c1 80 00 c2',\r\n'\u98a8\u91cf\u81ea\u52d5' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 a0 00 00 06 60 00 00 c1 80 00 c2',\r\n'\u98a8\u91cf\u9759' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 b0 00 00 06 60 00 00 c1 80 00 d2',\r\n'\u98a8\u91cf1' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 30 00 00 06 60 00 00 c1 80 00 52',\r\n'\u98a8\u91cf2' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 40 00 00 06 60 00 00 c1 80 00 62',\r\n'\u98a8\u91cf3' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 50 00 00 06 60 00 00 c1 80 00 72',\r\n'\u98a8\u91cf4' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 60 00 00 06 60 00 00 c1 80 00 82',\r\n'\u98a8\u91cf5' : '11 da 27 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 $t 11 da 27 00 00 39 30 00 70 00 00 06 60 00 00 c1 80 00 92'\r\n};\r\n&lt;\/script&gt;\r\n&lt;style&gt;\r\nbutton { font-size:18px; width: 100px; }\r\ndiv { width:330px; border: 2px solid coral; margin-left: 10px; padding-top: 10px; padding-bottom: 10px; text-align:center; line-height: 200%;}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;h1&gt;ESP_IR_SERVER(AIR-CON)&lt;\/h1&gt;\r\n&lt;div id='main' \/&gt;\r\n&lt;\/div&gt;&lt;\/body&gt;&lt;\/html&gt;\r\n<\/pre>\n<p>\u69cb\u9020\u306f\u30c6\u30ec\u30d3\u7528\u3068\u540c\u3058\u3002\u4fe1\u53f7\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304cAEHA\u306a\u306e\u3067\u3001setup()\u3092\u547c\u3076\u969b\u306b&#8217;A&#8217;\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/10\/daikin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5018\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/10\/daikin.png\" alt=\"daikin\" width=\"495\" height=\"240\" \/><\/a><\/p>\n<p>\u3053\u3061\u3089\u306f\u3001\u51b7\u623f\u958b\u59cb\u3092\u62bc\u3059\u3068\u904b\u8ee2\u3092\u958b\u59cb\u3059\u308b\uff0824\u2103\u3001\u98a8\u91cf\u81ea\u52d5\uff09\u3002\u98a8\u91cf\u30926\u7a2e\u985e\u7528\u610f\u3057\u305f\u3002\u6e29\u5ea6\u306b\u6bd4\u3079\u3066\u3001\u98a8\u91cf\u304c\u5909\u5316\u3057\u305f\u3053\u3068\u306f\u3059\u3050\u306b\u5206\u304b\u308b\u304b\u3089\u3002\u98a8\u91cf\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u5fc5\u305a24\u2103\u306e\u51b7\u623f\u904b\u8ee2\u306b\u306a\u308b\u3002<\/p>\n<h4>\u5171\u901a\u306ejavsScript\u30d5\u30a1\u30a4\u30eb(funcs.js)<\/h4>\n<pre class=\"lang:js decode:true\" title=\"funcs.js\">\/** support functions *\/\r\nfunction http_request(uri) {\r\n\tvar request = new XMLHttpRequest();\r\n\trequest.open('GET', uri, false)\r\n\trequest.send();\r\n\tif (request.status != 200)\r\n\t\talert('error');\r\n}\r\n\r\nfunction setup(tx_format) {\r\n\tvar div = document.getElementById('main');\r\n\tvar i = 0;\r\n\tfor(key in params) {\r\n\t\tif (key[0] != 'a') {\r\n\t\t\tvar button = document.createElement('button');\r\n\t\t\tbutton.innerHTML = key;\r\n\t\t\tlet code = '$' + tx_format + ' ' + params[key];\r\n\t\t\tbutton.onclick = function(){\r\n\t\t\t\tcode = '\/ircmd?cmd=' + code.replace(\/\\s\/g, '%20');\r\n\t\t\t\thttp_request(s);\r\n\t\t\t\t\/\/ alert(code);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tdiv.appendChild(button);\r\n\t\t\tdiv.appendChild(document.createTextNode('\\u0020'));\r\n\t\t}\r\n\t\tif (++i % 3 == 0)\r\n\t\t\tdiv.appendChild(document.createElement('br'));\r\n\t}\r\n\tif (i % 3 != 0)\r\n\t\tdiv.appendChild(document.createElement('br'));\r\n\treturn true;\r\n}\r\n<\/pre>\n<h6>function http_request(uri)<\/h6>\n<p>\u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u308buri\u306b\u540c\u671f\u7684\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<h6>function setup(tx_format)<\/h6>\n<p>\u5404html\u306ewindow.onload() \u3067\u5b9f\u884c\u3055\u308c\u308b\u3002id=&#8217;main&#8217; \u3067\u793a\u3055\u308c\u308b&lt;div&gt;\u5185\u306b\u3069\u3093\u3069\u3093&lt;button&gt;\u30bf\u30b0\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3002\u8ffd\u52a0\u3059\u308b\u3068\u304d\u306b\u3001html\u304c\u3082\u3064\u9023\u60f3\u914d\u5217params\u306e\u30ad\u30fc\u3092\u30dc\u30bf\u30f3\u306einnerHTML\u3068\u3057\u3001\u5024\u304b\u3089\u30ea\u30af\u30a8\u30b9\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u4f5c\u3063\u3066onclick\u6642\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u5148\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u3044\u305a\u308c\u306ehtml\u30d5\u30a1\u30a4\u30eb\u3082\u3001WEB\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u52d5\u4f5c\u3057\u3066\u3044\u308bWROOM02\u306b\u5bfe\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u304b\u3089 \/regza.html \u3084 \/daikin.html \u3068\u3044\u3063\u305f\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u958b\u304f\u3002<\/p>\n<h2>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h2>\n<p>WROOM02\u3068\u8d64\u5916\u7dda\u53d7\u4fe1\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u5f97\u305f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3\u306e\u9001\u4fe1\u30b3\u30fc\u30c9\u5229\u7528\u3057\u3001WROOM02\u3068IrLED\u3092\u7d44\u307f\u5408\u308f\u305b\u3001\u306a\u304a\u304b\u3064WiFi\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u3084WEB\u30b5\u30fc\u30d0\u30fc\u6a5f\u80fd\u3082\u5229\u7528\u3057\u3064\u3064\u5bb6\u96fb\u7528\u30ea\u30e2\u30b3\u30f3\u304c\u5b9f\u73fe\u3067\u304d\u305d\u3046\u306a\u3053\u3068\u306f\u5206\u304b\u3063\u305f\u3002<br \/>\n\u30a8\u30a2\u30b3\u30f3\u7528\u3092\u3061\u3083\u3093\u3068\u3084\u308b\u306a\u3089\u3070\u3001\u30a8\u30a2\u30b3\u30f3\u304c\u51fa\u3057\u3066\u304f\u308b\u30b3\u30fc\u30c9\u3092\u3061\u3083\u3093\u3068\u89e3\u6790\u3057\u3001\u904b\u8ee2\u7a2e\u5225\u30d3\u30c3\u30c8\u3001\u6e29\u5ea6\u7528\u30d3\u30c3\u30c8\u3001\u98a8\u91cf\u7528\u30d3\u30c3\u30c8\u3001\u904b\u8ee2\u7528\u30d3\u30c3\u30c8\u3001\u30c1\u30a7\u30c3\u30af\u30b5\u30e0\u751f\u6210\u65b9\u6cd5\u306a\u3069\u3092\u6d17\u3044\u51fa\u3057\u3066\u3044\u3051\u3070\u3088\u3044\u3060\u308d\u3046\u3002\u5e38\u306b\u30ea\u30e2\u30b3\u30f3\u7528\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u3044\u3066\u304a\u304f\u308f\u3051\u306b\u3082\u3044\u304b\u306a\u3044\u306e\u3067\u3001\u4eee\u60f3\u7684\u306a\uff1f\u30a8\u30a2\u30b3\u30f3\u306e\u72b6\u614b\u3092WROOM02\u5185\u90e8\u306b\u7dad\u6301\u3057\u306a\u304c\u3089\u3001javaScript\u3067\u305d\u308c\u3092\u554f\u3044\u5408\u308f\u305b\u3001\u72b6\u614b\u306b\u5fdc\u3058\u305f\u5bfe\u8c61\u88fd\u54c1\u3054\u3068\u306e\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u3092\u7d44\u307f\u7acb\u3066\u308b\u306e\u304c\u3088\u3055\u305d\u3046\u3067\u3042\u308b\u3002<\/p>\n<p>\u4eca\u56de\u306fWEB\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u69cb\u6210\u3057\u305f\u304c\u3001\u81ea\u52d5\u904b\u8ee2\u3092\u8003\u3048\u308b\u306a\u3089\u3070\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306eWEB\u30b5\u30fc\u30d0\u30fc\u306b\u6e29\u5ea6\u3084\u6e7f\u5ea6\u3092\u5831\u544a\u3057\u305f\u5fdc\u7b54\u3068\u3057\u3066\u3001\u30a8\u30a2\u30b3\u30f3\u7528\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6301\u3063\u3066\u5e30\u3063\u3066\u304f\u308b\u3001\u3068\u3044\u3046\u306e\u3082\u3042\u308b\u3060\u308d\u3046\u3002\u5f53\u521d\u306f\u305d\u3046\u3044\u3046\u3064\u3082\u308a\u3067\u59cb\u3081\u305f\u306e\u3060\u3051\u3069\u3001\u6dbc\u3057\u304f\u306a\u3063\u3066\u304d\u305f\u306e\u3067\u3084\u308b\u6c17\u306b\u306a\u3089\u306a\u3044\u3002\u5bd2\u304f\u306a\u3063\u3066\u96ea\u304c\u964d\u308b\u3088\u3046\u306b\u306a\u308b\u524d\u306b\u3001\u5e30\u5b85\u306e\u3053\u308d\u3042\u3044\u3092\u898b\u8a08\u3089\u3063\u3066\u81ea\u52d5\u7684\u306b\u6696\u623f\u304c\u958b\u59cb\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u4ed5\u7d44\u307f\u306f\u4f5c\u3063\u3066\u307f\u3066\u3082\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<p>\u3061\u3087\u3046\u3069\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3\u95a2\u4fc2\u3067\u904a\u3093\u3067\u3044\u308b\u3068\u304d\u306b\u3001\u81ea\u5b85\u306e\u30b7\u30e3\u30ef\u30fc\u30c8\u30a4\u30ec\u306e\u30ea\u30e2\u30b3\u30f3\u304c\u58ca\u308c\u3066\u3057\u307e\u3063\u305f\u3002\u30ea\u30e2\u30b3\u30f3\u304c\u30c0\u30e1\u306b\u306a\u308b\u3068\u3001\u672c\u6765\u306e\u6a5f\u80fd\u3092\u307e\u3063\u305f\u304f\u679c\u305f\u3057\u3066\u304f\u308c\u306a\u3044\u306e\u306f\u56f0\u308a\u3082\u306e\u3067\u3042\u308b\u3002<br \/>\n\u5206\u89e3\u3057\u3066\u30c6\u30b9\u30bf\u30fc\u3067\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u30bf\u30af\u30c8\u30b9\u30a4\u30c3\u30c1\u304c\u4e00\u3064\u58ca\u308c\u3066\u304a\u308a\u3001\u5e38\u306b\u5c0e\u901a\u72b6\u614b\u306b\u306a\u3063\u3066\u62bc\u4e0b\u3055\u308c\u305f\u30ad\u30fc\u304c\u8b58\u5225\u4e0d\u80fd\u3001\u304b\u3064\u3001\u96fb\u6d41\u3082\u6d41\u308c\u7d9a\u3051\u3066\u3044\u305f\u3088\u3046\u3060\u3063\u305f\u3002\u624b\u6301\u3061\u306e\u30b9\u30a4\u30c3\u30c1\u3068\u4ea4\u63db\u3057\u305f\u3053\u3068\u3067\u6cbb\u3063\u305f\u306e\u3060\u3051\u3069\u3001\u8d64\u5916\u7dda\u3067\u9001\u51fa\u3055\u308c\u308b\u30b3\u30de\u30f3\u30c9\u30b3\u30fc\u30c9\u3082\u8abf\u3079\u3066\u304a\u3044\u305f\u306e\u3067\u3001\u3044\u3064\u3067\u3082\u4ee3\u308f\u308a\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306f\u306a\u3063\u305f\u3002<br \/>\n\u305f\u3060\u3001\u5834\u6240\u67c4\u304b\u3089\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u3067\u64cd\u4f5c\u3059\u308b\u308f\u3051\u306b\u3082\u3044\u304b\u306a\u3044\u304b\u3089\u30018\u3064\u304f\u3089\u3044\u306e\u30dc\u30bf\u30f3\u3092\u3082\u3064\u5c02\u7528\u6a5f\u3067\u3082\u4f5c\u3063\u3066\u304a\u3053\u306a\u3046\u304b\u306a\u3001\u3068\u304b\u601d\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u524d\u56de\u306e\u3001WROOM02\u3092\u4f7f\u3063\u305f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3 \u305d\u306e1 \u3067IrLED\u3092\u4f7f\u3063\u305f\u56de\u8def\u3084\u3001\u5bb6\u96fb\u7528\u30ea\u30e2\u30b3\u30f3\u306e\u30b3\u30de\u30f3\u30c9\u30b3\u30fc\u30c9\u306e\u9001\u51fa\u304c\u3046\u307e\u304f\u3044\u3063\u305f\uff08\u3088\u3046\u3067\u3042\u308b\uff09\u3002\u305f\u3060\u3001\u3044\u3061\u3044\u3061\u30ea\u30e2\u30b3\u30f3\u306e\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u66f8\u3044 &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=4883\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">WROOM02\u3092\u4f7f\u3063\u305f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3 \u305d\u306e2<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[65,70,86],"class_list":["post-4883","post","type-post","status-publish","format-standard","hentry","category-programming","tag-arduino","tag-esp8266","tag-remocon"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4883"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4883\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}