
{"id":4800,"date":"2016-09-24T16:24:36","date_gmt":"2016-09-24T07:24:36","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=4800"},"modified":"2018-09-07T14:55:33","modified_gmt":"2018-09-07T05:55:33","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","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=4800","title":{"rendered":"WROOM02\u3092\u4f7f\u3063\u305f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3 \u305d\u306e1"},"content":{"rendered":"<h1>\u6982\u8981<\/h1>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=4854\">\u30ea\u30e2\u30b3\u30f3\u7528\u8d64\u5916\u7dda\u53d7\u4fe1\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u305f\u8abf\u67fb<\/a>\u306b\u3088\u308a\u3001\u5bb6\u96fb\u7528\u30ea\u30e2\u30b3\u30f3\u304b\u3089\u306e\u4fe1\u53f7\u306e\u53d7\u4fe1\u3068\u3001\u30ea\u30e2\u30b3\u30f3\u304c\u9001\u4fe1\u3057\u3066\u3044\u308b\u5185\u5bb9\u306e\u30b3\u30fc\u30c9\u5316\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u6b21\u306f\u305d\u308c\u304c\u6b63\u3057\u3044\u306e\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u8d64\u5916\u7dda\u306e\u767a\u4fe1\u5074\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002\u89e3\u6790\u3057\u305f\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u5bb6\u96fb\u7528\u30ea\u30e2\u30b3\u30f3\u3068\u540c\u3058\u5185\u5bb9\u304c\u9001\u4fe1\u3067\u304d\u308b\u306e\u304b\u3001\u6700\u7d42\u7684\u306b\u306f\u5bb6\u96fb\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u3067\u304d\u308b\u306e\u304b\u3001\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n<h2>IrLED\u306e\u99c6\u52d5\u56de\u8def<\/h2>\n<p>\u307e\u305a\u6700\u521d\u306b\u3001IrLED\u3092\u99c6\u52d5\u3059\u308b\u305f\u3081\u306e\u56de\u8def\u3092\u8003\u3048\u308b\u3053\u3068\u306b\u3057\u305f\u3002IrLED\u3068\u3057\u3066\u306f\u3001\u4e00\u822c\u7684\u306a\u30ea\u30e2\u30b3\u30f3\u3068\u540c\u3058\u6ce2\u9577940nm\u306e\u8d64\u5916\u7dda\u3092\u767a\u5149\u3059\u308b\u3082\u306e\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u79cb\u6708\u96fb\u5b50\u306710\u672c100\u5186\u3067\u58f2\u3063\u3066\u3044\u308bOSI5LA5113A\u3068\u3044\u3046\u88fd\u54c1\u3092\u4f7f\u3063\u305f\u3002<a href=\"http:\/\/akizukidenshi.com\/download\/ds\/optosupply\/OSI5LA5113A.pdf\">\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306f\u3053\u3061\u3089<\/a>\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/94550c2105b9b5d535c844196d8f4030.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4823\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/94550c2105b9b5d535c844196d8f4030-552x414.jpg\" alt=\"IRLED\u306e\u30c6\u30b9\u30c8\u4e2d\" width=\"552\" height=\"414\" \/><\/a><\/p>\n<h6>\u62b5\u6297\u5024\u306e\u7b97\u51fa<\/h6>\n<p>\u4eca\u307e\u3067\u4f5c\u3063\u305f\u56de\u8def\u3067\u306f\u3001\u8d64\u3084\u7dd1\u306eLED\u304c\u30dd\u30fc\u30c8\u306e\u64cd\u4f5c\u3084\u96fb\u6e90\u306e\u72b6\u614b\u306b\u5fdc\u3058\u3066\u307c\u3093\u3084\u308a\u3068\u5149\u308c\u3070\u3088\u304b\u3063\u305f\u306e\u3060\u3051\u3069\u3001\u4eca\u56de\u306f\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3\u7528\u3068\u3044\u3046\u3053\u3068\u3067\u5f37\u3044\u5149\u304c\u6b32\u3057\u3044\u3002\u305d\u306e\u305f\u3081\u3001IrLED\u3092\u76f4\u5217\u306b2\u672c\u4e26\u3079\u3001\u304a\u306e\u304a\u306e\u306b\u5927\u304d\u306a\u96fb\u6d41\u304c\u6d41\u308c\u308b\u3088\u3046\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6c7a\u3081\u308b\u3053\u3068\u306b\u3057\u305f\u3002LED\u306e\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306e\u4e2d\u3067\u30dd\u30a4\u30f3\u30c8\u3068\u306a\u308b\u9805\u76ee\u306f\u3001<\/p>\n<ul>\n<li><strong>\u9806\u65b9\u5411\u96fb\u6d41 I<small>F<\/small> (max) : 100mA<\/strong><\/li>\n<li><strong>\u9806\u65b9\u5411\u96fb\u5727 V<small>F<\/small> (@I<small>F<\/small>=100mA ) : 1.35V(Typ.)\u30011.6V(max.)<\/strong><\/li>\n<\/ul>\n<p>\u3068\u3044\u3046\uff12\u70b9\u3060\u308d\u3046\u3002\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306bI<small>F<\/small>\u3068V<small>F<\/small>\u306e\u95a2\u4fc2\u3092\u793a\u3059\u30b0\u30e9\u30d5\u304c\u8f09\u3063\u3066\u3044\u306a\u3044\u306e\u304b\u6b8b\u5ff5\u3067\u3001\u4f8b\u3048\u3070LED\u306b50mA\u6d41\u3059\u3068\u304d\u306eV<small>F<\/small>\u306f\u3044\u304f\u3064\u306b\u306a\u308b\u306e\u304b\u304c\u5206\u304b\u3089\u306a\u3044\u3002<\/p>\n<figure id=\"attachment_4959\" aria-describedby=\"caption-attachment-4959\" style=\"width: 282px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/e8cf71cc1f133cbae8b592fc6322ae93-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4959\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/e8cf71cc1f133cbae8b592fc6322ae93-2.png\" alt=\"IRLED\u76f4\u52172\u500b\" width=\"282\" height=\"278\" \/><\/a><figcaption id=\"caption-attachment-4959\" class=\"wp-caption-text\">\u56f3 1\uff0e IrLED\u30c6\u30b9\u30c8\u56de\u8def<\/figcaption><\/figure>\n<p>\u307e\u305a\u306f\u3001 \u5358\u7d14\u306a\u30c6\u30b9\u30c8\u56de\u8def\u3092\u7528\u3044\u3066\u76f4\u5217\u62b5\u6297\u306eR1\u3092\u6c7a\u3081\u308b\u3053\u3068\u3068\u3057\u3001I<small>F<\/small> (max) = 100mA\u306b\u5bfe\u3057\u3066\u4f59\u88d5\u306e\u3042\u308bI<small>F<\/small>\u00a0=60mA\u3001V<small>F =\u00a0<\/small>1.35V\u3068\u3057\u3066R1\u3092\u7b97\u51fa\u3057\u305f\u3002<\/p>\n<p style=\"padding-left: 30px;\"><strong><em>R1 = (3.3 &#8211; 1.35\u00d72) \u00f7 0.06 = 10\u03a9<\/em><\/strong><\/p>\n<p>LED\u306b\u30d1\u30eb\u30b9\u3068\u3057\u3066\u96fb\u6d41\u3092\u6d41\u3059\u969b\u306b\u306f\u3088\u308a\u5927\u304d\u306a\u96fb\u6d41\u3092\u6d41\u3059\u3053\u3068\u3082\u3067\u304d\u308b (\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306eI<small>FP<\/small>) \u3002\u30c6\u30b9\u30c8\u56de\u8def\u3067\u306f\u5e38\u6642\u70b9\u706f\u3055\u305b\u308b\u306e\u3067 I<small>F<\/small> (max) \u3088\u308a\u3082\u5c0f\u3055\u306a\u96fb\u6d41\u5024\u3068\u3057\u305f\u3002<\/p>\n<h6>\u30c6\u30b9\u30bf\u30fc\u306b\u3088\u308b\u5b9f\u6e2c<\/h6>\n<p>\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\u4e0a\u306b\u56f3\uff11\u306e\u30c6\u30b9\u30c8\u7528\u56de\u8def\u3092\u7d44\u3093\u3067\u3001\u30c6\u30b9\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u96fb\u6d41\u3084\u96fb\u5727\u3092\u6e2c\u3063\u305f\u307f\u305f\u3068\u3053\u308d\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<ul>\n<li>\u96fb\u6e90\u96fb\u5727\uff1a3.26V<\/li>\n<li>IrLED1\u306e\u30a2\u30ce\u30fc\u30c9\uff0d\u30ab\u30bd\u30fc\u30c9\u9593\u306e\u96fb\u4f4d\u5dee\uff1a1.26V<\/li>\n<li>IrLED2\u306e\u30a2\u30ce\u30fc\u30c9\uff0d\u30ab\u30bd\u30fc\u30c9\u9593\u306e\u96fb\u4f4d\u5dee\uff1a1.26V<\/li>\n<li>R1\u4e21\u7aef\u306e\u96fb\u4f4d\u5dee \uff1a 0.74V<\/li>\n<\/ul>\n<p>10\u03a9(\u00b15%) \u306eR1\u4e21\u7aef\u9593\u306e\u96fb\u4f4d\u5dee\u304b\u3089\u3001\u76f4\u52172\u672c\u306eLED\u3092\u6d41\u308c\u308bI<small>F<\/small>\u00a0\u306f\u7d0474mA\u3068\u306a\u308b\u3053\u3068\u304c\u5206\u304b\u3063\u305f\u3002\u307e\u305f\u3001\u96fb\u6e90\u96fb\u5727\u3084\u5404IrLED\u3067\u6e2c\u5b9a\u3057\u305f\u96fb\u4f4d\u5dee(V<small>F<\/small>)\u3092\u5f53\u3066\u306f\u3081\u3066\u8a08\u7b97\u3057\u3066\u307f\u3066\u3082\u3001<\/p>\n<p style=\"padding-left: 30px;\"><strong><em>I<small>F<\/small>\u00a0 = (3.26 &#8211; 1.26\u00d72) \u00f7 10\u03a9 = 74mA<\/em><\/strong><\/p>\n<p>\u3068\u306a\u308a\u3001I<small>F<\/small> (max)\u306b\u306f\u307e\u3060\u4f59\u88d5\u304c\u3042\u308b\u3002\u5b9f\u969b\u306e\u56de\u8def\u3067\u3082R1=10\u03a9\u3092\u4f7f\u3046\u3053\u3068\u3068\u3057\u305f\u30020.74\u00d70.74\u00f710 = 0.05W \u306a\u306e\u3067\u3001\u62b5\u6297\u30821\/4W\u898f\u683c\u306e\u3082\u306e\u3067\u5341\u5206\u3067\u3042\u308b\u3002<\/p>\n<h2>\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u306b\u3088\u308b\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0<\/h2>\n<p>\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3\u3092\u4f5c\u308b\u306b\u306f\u3001\u6ce2\u9577940nm\u306e\u8d64\u5916\u7dda\u309238kHz(\u30c7\u30e5\u30fc\u30c6\u30a3\u30fc\u6bd41\/3\uff09\u3067\u30aa\u30f3\uff0f\u30aa\u30d5\u3057\u3064\u3064\u3001\u9001\u4fe1\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306b\u5408\u308f\u305b\u3066\u8ad6\u7406\u5024\u3092\u51fa\u529b\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3089\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3088\u308b\u30dd\u30fc\u30c8\u64cd\u4f5c\u3067\u30aa\u30f3\uff0f\u30aa\u30d5\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3059\u308b\u3002<br \/>\n\u307e\u305f\u3001ESP8266EX\u306e\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8\u306b\u3088\u308c\u3070\u3001GPIO\u30dd\u30fc\u30c8\u304c\u6d41\u305b\u308b\u96fb\u6d41\u306f\u6700\u592712mA\u3068\u6c7a\u307e\u3063\u3066\u3044\u308b\u304b\u3089\u3001WROOM02\u306eGPIO\u306b\u56f3\uff11\u306e\u56de\u8def\u3092\u76f4\u7d50\u3057\u3066\u99c6\u52d5\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002\u305d\u306e\u305f\u3081\u3001\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u3092\u4f7f\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0\u56de\u8def\u3092\u7528\u610f\u3057\u305f\u3002<\/p>\n<figure id=\"attachment_4962\" aria-describedby=\"caption-attachment-4962\" style=\"width: 294px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/988856d44b0f0cf0243b8b895cdfd59e-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-4962\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/988856d44b0f0cf0243b8b895cdfd59e-2.png\" alt=\"IRLED\u76f4\u52172\u500b\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u99c6\u52d5\" width=\"294\" height=\"281\" \/><\/a><figcaption id=\"caption-attachment-4962\" class=\"wp-caption-text\">\u56f3 2\uff0e IrLED\u99c6\u52d5\u56de\u8def<\/figcaption><\/figure>\n<p>\u56db\u89d2\u3044\u67a0\u3067\u56f2\u307e\u308c\u305f #5 \u306f\u3001WROOM02\u306e5\u756a\u30d4\u30f3\uff08GPIO13\uff09\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3092\u793a\u3057\u3066\u304a\u308a\u3001<em>digitalWrite(13, HIGH)<\/em> \u3068\u304b<em>LOW<\/em>\u3068\u304b\u3084\u308b\u3053\u3068\u3067\u3001IrLED\u3092\u70b9\u6ec5\u3055\u305b\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<h6>\u30d9\u30fc\u30b9\u62b5\u6297R2\u306e\u6c7a\u5b9a<\/h6>\n<p>\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u3092<strong>\u5897\u5e45\u5668<\/strong>\u3068\u3057\u3066\u7528\u3044\u308b\u5834\u5408\u306f\u3001<\/p>\n<p style=\"padding-left: 30px;\"><strong><em>\u30b3\u30ec\u30af\u30bf\u96fb\u6d41 (I<small>C<\/small>) = \u30d9\u30fc\u30b9\u96fb\u6d41(I<small>B<\/small>) \u00d7\u00a0\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u306eh<small>FE<\/small>\u5024<\/em><\/strong><\/p>\n<p>\u3068\u3044\u3046\u5f0f\u3092\u4f7f\u3046\u30022SC1815GR\u306eh<small>FE<\/small>\u306e\u4ee3\u8868\u5024\u306f200\u306a\u306e\u3067\u4eca\u56de\u306e\u56de\u8def\u306b\u5fc5\u8981\u306a\u30d9\u30fc\u30b9\u96fb\u6d41\u306f\u3001<\/p>\n<p style=\"padding-left: 30px;\"><strong><em>I<small>B<\/small>\u00a0= 70mA \/ 200 = 0.35mA<\/em><\/strong><\/p>\n<p>\u3067\u3088\u3044\u3088\u3046\u306b\u601d\u3048\u308b\u3002<\/p>\n<p>\u305f\u3060\u4eca\u56de\u306e\u56de\u8def\u3067\u306f\u3001\u30b3\u30ec\u30af\u30bf\uff0d\u30a8\u30df\u30c3\u30bf\u9593\u306e\u96fb\u4f4d\u5dee(V<small>CE<\/small>)\u3092\u306a\u308b\u3079\u304f\u5c0f\u3055\u304f\u3059\u308b\u3053\u3068\u3067\u30b3\u30ec\u30af\u30bf\u96fb\u6d41(I<small>C<\/small>)\u3092\u5927\u304d\u304f\u3057\u305f\u3044\u3002V<small>CE<\/small>\u3092\u6700\u5c0f\u5024\u8fd1\u304f\u3067\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u306b\u306f\u3001<span style=\"text-decoration: underline;\">\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u3092\u98fd\u548c\u3055\u305b\u3066\u4f7f\u3046<\/span>\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n<a href=\"http:\/\/akizukidenshi.com\/download\/2sc1815-y.pdf\">2SC1815\u306e\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8<\/a>\u306b\u3042\u308b\u3044\u308d\u3044\u308d\u306a\u7279\u6027\u56f3\u306e\u3046\u3061\u3001\u4ee5\u4e0b\u306b\u793a\u3059<strong>I<small>C<\/small>-V<small>CE<\/small>\u66f2\u7dda<\/strong>\u3092\u898b\u308b\u3068\u3001\u5c0f\u3055\u306aV<small>CE<\/small>\u5024\u3092\u7dad\u6301\u3057\u305f\u307e\u307eI<small>C<\/small>\u304c\u76f4\u7dda\u7684\u306b\u7acb\u3061\u4e0a\u304c\u3063\u3066\u3044\u308b\u9818\u57df\u304c\u3042\u308b\u3002<\/p>\n<figure id=\"attachment_4970\" aria-describedby=\"caption-attachment-4970\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/2sc1815.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-4970\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/2sc1815-552x497.png\" alt=\"2sc1815 IC-VCE\" width=\"552\" height=\"497\" \/><\/a><figcaption id=\"caption-attachment-4970\" class=\"wp-caption-text\">2SC1815\u306e IC-VCE\u7279\u6027\u56f3 (\u6771\u829d\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8 2007-11-01\u3088\u308a\u629c\u7c8b\uff09<\/figcaption><\/figure>\n<p>\u98fd\u548c\u3055\u305b\u3066\u4f7f\u3046\u3068\u304d\u306b\u306f\u3001\u3053\u306e\u9818\u57df\u306b\u306a\u308b\u3088\u3046\u306aI<small>B<\/small>\u00a0\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308b\u3002\u4eca\u56de\u306f\u3001I<small>B<\/small>\u00a0\u30924mA\u7a0b\u5ea6\u3068\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u30024mA\u6d41\u3059\u5834\u5408\u306eR2\u306e\u5024\u306f\u3001<\/p>\n<p style=\"padding-left: 30px;\"><em><strong>R2 = (3.3 &#8211; 0.6)V \/ 4mA = 675\u03a9\u00a0<\/strong><\/em><\/p>\n<p>\u3068\u306a\u308b\u304b\u3089\u00a0<strong>R2 = 680\u03a9<\/strong>\u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u305f\u30020.6V\u306f\u30d9\u30fc\u30b9\uff0d\u30a8\u30df\u30c3\u30bf\u9593\u306e\u96fb\u5727\u3002\u3053\u306e\u5024\u306e\u5834\u5408\u3001WROOM02\u306eGPIO\u30dd\u30fc\u30c8\u3092HIGH\u3068\u3057\u305f\u3068\u304d\u306b\u7d04 4mA \u6d41\u308c\u51fa\u3059\u3053\u3068\u306b\u306a\u308b\u304c\u3001\u6700\u5927\u5b9a\u683c\u5024\u4ee5\u4e0b\u3067\u3042\u308b\u3002\u306a\u304a\u3001\u5b9f\u4f7f\u7528\u6642\u306b\u306fIrLED\u306f\u77ed\u3044\u671f\u9593\u70b9\u6ec5\u3059\u308b\u3060\u3051\u306a\u306e\u3067\u3001\u3082\u3046\u3061\u3087\u3063\u3068\u6d41\u3057\u3066\u3084\u3063\u3066\u3082\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<h6>\u30c6\u30b9\u30bf\u30fc\u306b\u3088\u308b\u5b9f\u6e2c<\/h6>\n<p>WROOM02\u306eGPIO13\u3092\u5e38\u6642HIGH\u306b\u3059\u308b\u30b9\u30b1\u30c3\u30c1\u3092\u52d5\u304b\u3057\u3066\u304a\u304d\u3001\u30c6\u30b9\u30bf\u30fc\u3067\u5404\u90e8\u306e\u96fb\u5727\u3092\u6e2c\u5b9a\u3057\u305f\u3002<\/p>\n<ul>\n<li>\u96fb\u6e90\u96fb\u5727\uff1a3.26V<\/li>\n<li>R1\u4e21\u7aef\u306e\u96fb\u4f4d\u5dee \uff1a 0.61V<\/li>\n<\/ul>\n<p>R1\u306e\u4e21\u7aef\u306e\u96fb\u4f4d\u5dee\u304c\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u3092\u4f7f\u308f\u306a\u3044\u7d20\u901a\u3057\u306e\u3068\u304d\u306b\u6bd4\u3079\u3066 0.74 &#8211; 0.61 = 0.13V\u6e1b\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304cV<small>CE<\/small> \u3060\u308d\u3046\u3002\u307e\u305f\u3001\u809d\u5fc3\u306eLED\u306eI<small>F<\/small>\u00a0\u306f 0.61\u00f710 = 61mA\u3068\u306a\u3063\u305f\u3002\u5f0f\u306b\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002<\/p>\n<ul>\n<li style=\"padding-left: 30px;\"><strong><em>I<small>F<\/small>\u00a0 = (Vcc &#8211; V<small>F<\/small>\u00a0\u00d7 2 &#8211; V<small>CE<\/small>) \u00f7 R1<\/em><\/strong><\/li>\n<li style=\"padding-left: 30px;\"><strong><em>I<small>F<\/small>\u00a0 = (3.26 &#8211; 1.26\u00d72 &#8211; 0.13) \u00f7 10\u03a9 = 61mA<\/em><\/strong><\/li>\n<\/ul>\n<p>I<small>C<\/small>\u00f7I<small>B<\/small>\u00a0\u306e\u5024(h<small>FE<\/small>)\u306f\u7d0415\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u3067\u306f\u3001\u6700\u521d\u306b\u66f8\u3044\u305f\u00a0<em>I<small>B<\/small>\u00a0= 70mA \/ 200 = 0.35mA<\/em> \u3068\u3044\u3046\u95a2\u4fc2\u3092\u4fe1\u3058\u305f\u5834\u5408\u306b\u306f\u3069\u3046\u306a\u306e\u304b\u3068\u3044\u3046\u3053\u3068\u3067\u3001I<small>B<\/small>\u00a0\u304c\u7d040.4mA\u306b\u306a\u308b\u3088\u3046R2\u30926.8k\u03a9\u306b\u5909\u3048\u3066\u307f\u305f\u3068\u3053\u308d\u3001R1\u306e\u4e21\u7aef\u306e\u96fb\u4f4d\u5dee\u306f0.38V\u306b\u306a\u3063\u305f\u3002\u3064\u307e\u308a\u3001V<small>CE<\/small>\u00a0\u306e\u4e0a\u6607\u306b\u3088\u3063\u3066\u30b3\u30ec\u30af\u30bf\u96fb\u6d41\u304c\u6e1b\u308a\u3001LED\u306eI<small>F<\/small>\u00a0\u306f38mA\u306b\u306a\u3063\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u3082\u3063\u3068\u98fd\u548c\u3055\u305b\u3066\u4f7f\u308f\u306a\u3044\u3068\u3001\u3082\u3063\u305f\u3044\u306a\u3044\u306e\u3067\u3042\u308b\u3002\u306a\u304a\u3001\u4e0a\u306b\u793a\u3057\u305f<strong>I<small>C<\/small>-V<small>CE<\/small>\u66f2\u7dda<\/strong>\u3092\u898b\u308b\u3068 I<small>B<\/small>\u00a0=0.4mA \u306a\u3089\u3070I<small>C<\/small>\u306e\u5024\u306f\u3053\u306e\u5b9f\u6e2c\u5024\u304f\u3089\u3044\u3067\u59a5\u5f53\u3060\u308d\u3046\u3002<\/p>\n<h2>WROOM02-IRLED<\/h2>\n<p>WROOM02\u306b\u4e0a\u8a18\u306eIrLED\u99c6\u52d5\u56de\u8def\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u3082\u306e\u3092\u4ee5\u4e0b\u306b\u793a\u3059\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/WROOM02-IR-2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-5063\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/WROOM02-IR-2-1-552x414.png\" alt=\"wroom02-ir-2\" width=\"552\" height=\"414\" \/><\/a><\/p>\n<p>\u3053\u306e\u56de\u8def\u306b\u306f\u3001\u5148\u306e\u8d64\u5916\u7dda\u53d7\u5149\u30e2\u30b8\u30e5\u30fc\u30eb\u3082\u542b\u3093\u3067\u3044\u308b\u304c\u3001\u53d7\u5149\u7528\u306b\u4f7f\u3046\u304b\u767a\u5149\u7528\u306b\u4f7f\u3046\u304b\u306f\u30b9\u30b1\u30c3\u30c1\u6b21\u7b2c\u3068\u3044\u3046\u3053\u3068\u3002\u305f\u3060\u9001\u53d7\u4fe1\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3046\u305f\u3081\u306b\u306f\u3001\u5225\u3005\u306e\u30dc\u30fc\u30c9\u306b\u7528\u610f\u3057\u305f\u65b9\u304c\u3084\u308a\u3084\u3059\u3044\u3002<\/p>\n<h2>IrLED\u306e\u70b9\u706f\u306e\u69d8\u5b50<\/h2>\n<p>\u8d64\u5916\u7dda\u306f\u8089\u773c\u3067\u306f\u898b\u3048\u306a\u3044\u3082\u306e\u306e\u3001\u30c7\u30b8\u30ab\u30e1\u306e\u30bb\u30f3\u30b5\u30fc\u306b\u306f\u5199\u308b\u3002\u30c7\u30b8\u30ab\u30e1\u3084\u30ab\u30e1\u30e9\u4ed8\u304d\u643a\u5e2f\u96fb\u8a71\u306e\u767b\u5834\u4ee5\u6765\u3001\u30ea\u30e2\u30b3\u30f3\u306e\u96fb\u6c60\u304c\u30c1\u30a7\u30c3\u30af\u304c\u3057\u3084\u3059\u304f\u306a\u3063\u305f\u3082\u306e\u3067\u3042\u308b\u3002<br \/>\nIrLED\u304c\u767a\u5149\u3059\u308b\u69d8\u5b50\u3092\u5199\u3059\u305f\u3081\u306b\u3001\u30b9\u30de\u30db\u3092\u542b\u3081\u3066\u624b\u6301\u3061\u306e\u3044\u304f\u3064\u304b\u306e\u30ab\u30e1\u30e9\u3067\u8a66\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u30aa\u30ea\u30f3\u30d1\u30b9\u306eE-PM2 (\u30da\u30f3\u30df\u30cb\uff12)\u304c\u4e00\u756a\u660e\u308b\u304f\u5199\u3063\u3066\u304f\u308c\u305f\u3002\u30ec\u30f3\u30ba\u306fMZD60mm F2.8\u3092\u4f7f\u7528\u3002\u6307\u5411\u6027\u306e\u5f37\u3055\u3082\u5206\u304b\u308b\u306e\u3067\u3001\u52d5\u753b\u306b\u3057\u3066Youtube\u306b\u7f6e\u3044\u305f\u3002<\/p>\n<p><iframe loading=\"lazy\" title=\"IRLED\u70b9\u706f\u6642\" width=\"672\" height=\"378\" src=\"https:\/\/www.youtube.com\/embed\/74OFMFoEBn4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>\u6a2a\u304b\u3089\u307f\u308b\u3068\u3001\u307b\u306e\u304b\u306b\u5149\u3063\u3066\u3044\u308b\u7a0b\u5ea6\u306b\u898b\u3048\u308b\u304c\u6b63\u9762\u304b\u3089\u898b\u308b\u3068\u304b\u306a\u308a\u660e\u308b\u3044\u3053\u3068\u304c\u5206\u304b\u308b\u3002LED\u3092\u6f0f\u6597\u72b6\u3042\u308b\u3044\u306f\u30d1\u30a4\u30d7\u72b6\u306e\u30ab\u30e9\u30fc\u3067\u56f2\u3093\u3067\u3084\u3063\u3066\u3001\u5148\u7aef\u304c\u5bfe\u8c61\uff08\u30a8\u30a2\u30b3\u30f3\u3084\u30c6\u30ec\u30d3\uff09\u306b\u5411\u3044\u3066\u3044\u308b\u3053\u3068\u304c\u306f\u3063\u304d\u308a\u5206\u304b\u308b\u3088\u3046\u306b\u3057\u305f\u65b9\u304c\u826f\u3055\u305d\u3046\u3067\u3042\u308b\u3002<\/p>\n<h2>\u30d7\u30ed\u30b0\u30e9\u30e0<\/h2>\n<p>\u8d64\u5916\u7dda\u30ea\u30e2\u30b3\u30f3\u3068\u3057\u3066\u52d5\u4f5c\u3055\u305b\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u65b9\u91dd\u3067\u8a18\u8ff0\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<ul>\n<li>WiFi\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u3068\u3057\u3066\u69cb\u6210\u3057\u3001PC\u3084\u30b9\u30de\u30db\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u63a5\u7d9a\u3057\u3066\u64cd\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3002<\/li>\n<li>ESP8266 Arduino core \u306b\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3001<a href=\"https:\/\/github.com\/esp8266\/Arduino\/tree\/master\/libraries\/ESP8266WebServer\">ESP8266WebServer\u30af\u30e9\u30b9<\/a>\u3092\u5229\u7528\u3057\u3066web\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u69cb\u6210\u3059\u308b\u3002<\/li>\n<li>\u30ea\u30af\u30a8\u30b9\u30c8\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u9001\u4fe1\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3068\u9001\u51fa\u7528\u30b3\u30de\u30f3\u30c9\u30b3\u30fc\u30c9\u3092\u4e0e\u3048\u308b\u3068\u3001IrLED\u3092\u30c1\u30ab\u30c1\u30ab\u3055\u305b\u3066\u9001\u4fe1\u3059\u308bURI\u3092\u7528\u610f\u3059\u308b\u3002<\/li>\n<li>\u30c6\u30b9\u30c8\u7528\u306e\u5e38\u6642\u70b9\u706f\u306a\u3069\u3092\u5b9f\u884c\u3059\u308bURI\u3082\u7528\u610f\u3059\u308b\u3002<\/li>\n<\/ul>\n<h3>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 (ESP_IRSERVER1.ino)<\/h3>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"ESP_IRSERVER1.ino\">#include &lt;ESP8266WiFi.h&gt;\r\n#include &lt;ESP8266WebServer.h&gt;\r\n\r\n#define START_MSG \"\\n\" + String(__FILE__) + \" start.\"\r\n\r\nESP8266WebServer server(80);\r\nconst char* ssid = \"ESP8266AP\";\r\nconst char* password = \"password\";\r\nconst int RED_LED = 12;\r\nconst int IR_LED = 13;\r\nvoid handleCommand();\r\nvoid handleIrTest();\r\n\r\nvoid setup(void){\r\n  delay(10);\r\n  Serial.begin(115200);\r\n  pinMode(RED_LED, OUTPUT);\r\n  digitalWrite(RED_LED, 0);\r\n  pinMode(IR_LED, OUTPUT);\r\n  digitalWrite(IR_LED, 0);\r\n  Serial.println(START_MSG);\r\n  WiFi.softAP(ssid, password);\r\n  IPAddress ip = WiFi.softAPIP();\r\n  Serial.println(\"\");\r\n  Serial.println(ssid + String(\" starts...(\") + ip.toString() + \")\"); \r\n  server.on(\"\/irtest\", handleIrTest);\r\n  server.on(\"\/ircmd\", handleCommand);\r\n  server.begin();\r\n  Serial.println(\"HTTP server started\");\r\n}\r\n\r\nvoid loop(void){\r\n  server.handleClient();\r\n}\r\n\r\n#define MAX_FRAME 4\r\n#define MAX_DATA  60\r\ntypedef struct {\r\n  char format;\r\n  int data_index;\r\n  int data_length[MAX_FRAME];\r\n  byte data[MAX_FRAME][MAX_DATA];\r\n} ircmd_t;\r\n\r\n#define NEC_T 560\r\n#define AEHA_T  425\r\n\r\nint format_T; \/\/ \u57fa\u6e96\u30d5\u30ec\u30fc\u30e0\u6642\u9593\r\nint loop_limit; \/\/ 38kHz 1\u6ce2\u5206\u306e\u30eb\u30fc\u30d7\u56de\u6570\r\n\r\n\/\/ 1\u5468\u671f 26usec, H : 6usec, L : 20usec.\r\nvoid init_format(char c) {\r\n  format_T = c == 'N' ? NEC_T : AEHA_T;\r\n  loop_limit = format_T \/ 26;\r\n}\r\n\r\nvoid send_H(int t) {\r\n  int limit = t == 1 ? loop_limit : loop_limit * t;\r\n  for(int i = 0; i &lt; limit; i++) {\r\n    digitalWrite(IR_LED, HIGH);\r\n    delayMicroseconds(6);\r\n    digitalWrite(IR_LED, LOW);\r\n    delayMicroseconds(18);\r\n  }\r\n}\r\n\r\nvoid send_bit(int bit_value) {\r\n  send_H(1);\r\n  delayMicroseconds(bit_value ? format_T * 3 : format_T);\r\n}\r\n\r\n\/\/ value\u306eLSB\u304b\u30898\u30d3\u30c3\u30c8\u9001\u4fe1\u3002\r\nvoid send_byte(byte value) {\r\n  for(int i = 0; i &lt; 8 ; i++) {\r\n    send_bit(value &amp; 1);\r\n    value &gt;&gt;= 1;\r\n  }\r\n}\r\n\r\nvoid send_leader() {\r\n  if  (format_T == NEC_T) {\r\n    send_H(16);\r\n    delayMicroseconds(format_T * 8);   \r\n  } else {\r\n    send_H(8);\r\n    delayMicroseconds(format_T * 4);   \r\n  }\r\n}\r\n\r\nvoid send_preframe() {\r\n    for(int i = 0; i &lt; 4; i++)\r\n      send_bit(0);\r\n}\r\n\r\n\/\/ \u9069\u5f53\u306a\u7d42\u7aef\r\nvoid send_trailer() {\r\n    send_bit(0);  \/\/ stopbit of NEC.\r\n    digitalWrite(IR_LED, LOW);\r\n    delay(10);   \/\/ 10msec\u306e\u7121\u4fe1\u53f7\r\n}\r\n\r\n\/\/ 16\u9032\u8868\u8a18\u306e\u6587\u5b57\u5217\u3092byte\u306b\u5909\u63db\u3002\u5fc5\u305a2\u6841\u3067\u3042\u308b\u3053\u3068\u3002\r\nstatic const String acp = \"0123456789abcdef\";\r\nbyte hex2bin(String src) {\r\n  src.toLowerCase();\r\n  src.trim();\r\n  if (src.length() != 2)\r\n    return 0;\r\n  byte b = acp.indexOf(src.charAt(0)) &lt;&lt; 4;\r\n  b += acp.indexOf(src.charAt(1));\r\n  return b &amp; 0xff;\r\n}\r\n\r\nircmd_t* newCommand() {\r\n  ircmd_t* pcmd = (ircmd_t*)malloc(sizeof(ircmd_t));\r\n  if (pcmd)\r\n    memset((void*) pcmd, 0,  sizeof(ircmd_t));\r\n  return pcmd; \r\n}\r\n\r\nvoid dump_struct(ircmd_t* pcmd) {\r\n  Serial.println(\"dump ircmd_t\");\r\n  Serial.println(\"format = \" + String(pcmd-&gt;format));\r\n  Serial.println(\"data_index = \" + String(pcmd-&gt;data_index));\r\n  for(int index = 0; index &lt; pcmd-&gt;data_index; index++) {\r\n    Serial.print(\"index \");\r\n    Serial.print(index);\r\n    Serial.print(\" (length=\");\r\n    Serial.print(pcmd-&gt;data_length[index]);\r\n    Serial.print(\")\\t\");\r\n    for(int i = 0; i &lt; pcmd-&gt;data_length[index]; i++) {\r\n      char tmp[12];\r\n      sprintf(tmp, \"%02X\", pcmd-&gt;data[index][i]);\r\n      Serial.print(tmp);\r\n      Serial.print(\" \");\r\n    }\r\n    Serial.println(\".\");\r\n  }\r\n}\r\n\r\n\/\/ cmd=$N 00 11 22 ab $t\r\n\/\/ cmd=$A 00 11 22 ab ff dd $t\r\n\/\/ \u3068\u3044\u3063\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308a\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066IRLED\u3092\u70b9\u706f\u3059\u308b\u3002\r\n\/\/ $N : NEC, $A, AEHA\r\n\/\/ $t : \u30c8\u30ec\u30fc\u30e9\u30fc\r\nvoid handleCommand() {\r\n  String param = server.arg(\"cmd\");\r\n  Serial.println(\" handleCommand() cmd = \" + param);\r\n  ircmd_t* pcmd = newCommand();\r\n  if (pcmd == NULL) {\r\n     server.send(200, \"text\/plain\", \"NG ALLOC FAILED\");\r\n    return;\r\n  }\r\n  digitalWrite(RED_LED, 1);\r\n  char* cp = (char*)param.c_str();    \r\n  cp = strtok(cp, \" \");\r\n  while(cp) {\r\n    if (*cp == '$') {\r\n      cp++;\r\n      if (*cp == 'N' || *cp == 'A')\r\n        pcmd-&gt;format = *cp;\r\n      else if (*cp == 't') { \/\/ \u30c8\u30ec\u30fc\u30e9\u30fc       \r\n        pcmd-&gt;data_index++;\r\n        if (pcmd-&gt;data_index &gt;= MAX_FRAME)\r\n          break;\r\n      }\r\n    } else if (strlen(cp) == 2) {\r\n      int index = pcmd-&gt;data_index;\r\n      int data_length = pcmd-&gt;data_length[index];\r\n      pcmd-&gt;data[index][data_length++] = hex2bin(cp);\r\n      if (data_length &gt;= MAX_DATA)\r\n        break;\r\n      pcmd-&gt;data_length[index] = data_length;  \r\n    }\r\n    cp = strtok(NULL, \" \");\r\n  }\r\n  dump_struct(pcmd);\r\n\/\/ sending data \r\n  init_format(pcmd-&gt;format);\r\n  for(int index = 0; index &lt; MAX_FRAME; index++) {\r\n    if (pcmd-&gt;data_length[index] &gt; 0 &amp;&amp; pcmd-&gt;data_length[index] &gt; 0) {\r\n      send_preframe();\r\n      send_leader();\r\n      for(int i = 0; i &lt; pcmd-&gt;data_length[index]; i++)\r\n        send_byte(pcmd-&gt;data[index][i]);\r\n      send_trailer();\r\n    }\r\n  }\r\n  free(pcmd);\r\n  server.send(200, \"text\/plain\", \"OK\");\r\n  digitalWrite(RED_LED, 0);\r\n}\r\n\r\n\/\/ \u96fb\u6d41\u6e2c\u5b9a\u306e\u305f\u3081\u306b15\u79d2\u9593\u3064\u3051\u3063\u3071\u306a\u3057\u306b\u3059\u308b\u3002\r\nvoid handleIrTest() {\r\n  digitalWrite(RED_LED, 1);\r\n  Serial.println(\" handleIrTest()\");\r\n  server.send(200, \"text\/plain\", \"OK\");\r\n  digitalWrite(IR_LED, HIGH);\r\n  delay(15000);\r\n  digitalWrite(IR_LED, LOW);\r\n  digitalWrite(RED_LED, 0);\r\n}\r\n<\/pre>\n<p>\u3044\u304f\u3064\u304b\u306e\u95a2\u6570\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u3002\u8d64\u5916\u7dda\u9001\u4fe1\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u7b49\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=4854\">\u524d\u56de\u306e\u5185\u5bb9<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h6>\u8d64\u5916\u7dda\u95a2\u4fc2<\/h6>\n<h4>void send_H(int t)<\/h4>\n<p>38KHz\u3067IrLED\u3092\u70b9\u6ec5\u3055\u305b\u3001\u30d1\u30e9\u30e1\u30fc\u30bft\u306e\u671f\u9593\u306e<strong>\u30aa\u30f3<\/strong>\u4fe1\u53f7\u3092\u9001\u4fe1\u3059\u308b\u3002t\u306b\u306f\u3001\u57fa\u6e96\u6642\u9593T\u306e\u6574\u6570\u500d\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<p>GPIO\u30dd\u30fc\u30c8\u306e\u4e0a\u3052\u4e0b\u3052\u306b\u3088\u3063\u3066\u30c7\u30e5\u30fc\u30c6\u30a3\u30fc\u6bd41\/3\u306e38KHz\u4fe1\u53f7\u3092\u3001\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3054\u3068\u306eT\u76f8\u5f53\u6642\u9593\u3060\u3051\u767a\u5c04\u3057\u7d9a\u3051\u308b\u3002\u6ce2\u5f62\u3092\u89b3\u6e2c\u3057\u305f\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3060\u3051\u3069\u3001\u524d\u56de\u4f7f\u3063\u305f\u53d7\u4fe1\u5074\u56de\u8def\u3084\u5b9f\u969b\u306e\u5bb6\u96fb\u6a5f\u5668\u306f\u4e00\u5fdc\u610f\u56f3\u901a\u308a\u306b\u52d5\u3044\u3066\u304f\u308c\u305f\u3002<\/p>\n<h4>void send_bit(int bit_value)<\/h4>\n<p>1\u30d3\u30c3\u30c8\u76f8\u5f53\u306e\u4fe1\u53f7\u3092\u3001\u30aa\u30f3\u671f\u9593\u306f<em>send_H()<\/em>\u306e\u547c\u51fa\u3057\u3067\u3001\u30aa\u30d5\u671f\u9593\u306f\u6307\u5b9a\u6642\u9593\u306e\u7121\u4fe1\u53f7\u3067\u5b9f\u73fe\u3057\u3066\u3044\u308b\u3002<\/p>\n<h4>void send_byte(byte value)<\/h4>\n<p>1\u30d0\u30a4\u30c8\u76f8\u5f53\u306e\u4fe1\u53f7\u3092\u3001<em>send_bit()<\/em>\u306e\u547c\u3073\u51fa\u3057\u3092\u4e0b\u4f4d\u304b\u3089\u9806\u306b8\u56de\u7e70\u308a\u8fd4\u3059\u3053\u3068\u3067\u9001\u4fe1\u3059\u308b\u3002<\/p>\n<p>\u7e70\u308a\u8fd4\u3057\u306b\u3088\u308b\u9045\u5ef6\u304c\u6c17\u306b\u306a\u308b\u3068\u304d\u306b\u306f\u3001<\/p>\n<pre class=\"lang:c++ decode:true\" title=\"ESP_IRSERVER1.ino\">send_bit(value &amp; 1);\r\nsend_bit(value &amp; 2);\r\nsend_bit(value &amp; 4);\r\n....\r\n<\/pre>\n<p>\u3068\u3044\u3063\u305f\u30d9\u30bf\u306a\u66f8\u304d\u65b9\u3082\u3042\u308a\u3002<\/p>\n<h4>void send_leader(), send_trailer(), send_preframe()<\/h4>\n<p>\u30d5\u30ec\u30fc\u30e0\u3092\u69cb\u6210\u3059\u308b\u30c7\u30fc\u30bf\u4ee5\u5916\u306e\u90e8\u5206\u306e\u9001\u4fe1\u3092\u884c\u3046\u95a2\u6570\u3002<\/p>\n<p><em>send_leader()<\/em>\u306f\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3054\u3068\u306b\u7570\u306a\u3063\u305f\u5185\u5bb9\u3092\u9001\u4fe1\u3057\u3066\u3044\u308b\u304c\u3001<em>send_trailer()<\/em>\u304a\u3088\u3073<em>send_preframe()<\/em>\u306f\u5171\u901a\u3002<br \/>\n<em>send_preframe()<\/em> \u306b\u76f8\u5f53\u3059\u308b\u4fe1\u53f7\u306f\u898f\u683c\u306b\u306f\u5b58\u5728\u3057\u306a\u3044\u304c\u3001\u5b9f\u969b\u306e\u30ea\u30e2\u30b3\u30f3\u304b\u3089\u53d7\u4fe1\u3057\u305f\u30c7\u30fc\u30bf\u3092\u898b\u308b\u3068\u30ea\u30fc\u30c0\u30fc\u306e\u524d\u306b\u4f55\u3084\u3089\u30d1\u30e9\u30d1\u30e9\u3067\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u304b\u3063\u305f\u306e\u3067\u66f8\u3044\u3066\u307f\u305f\u3002<\/p>\n<h6>\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u53d7\u4fe1\u95a2\u4fc2<\/h6>\n<p>httpd\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u3066\u51e6\u7406\u3059\u308b\u90e8\u5206\u3002<\/p>\n<h4>byte hex2bin(String src)<\/h4>\n<p>16\u9032\u6570\u8868\u8a18\u306e\u6587\u5b57\u5217\u3092byte\u306b\u5909\u63db\u3059\u308b\u3002\u3069\u3093\u306a\u74b0\u5883\u3067\u3082\u3053\u306e\u95a2\u6570\u3092\u66f8\u304f\u3053\u3068\u304c\u591a\u3044\u3002\u4eca\u56de\u306fString \u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u5b9f\u88c5\u3002<\/p>\n<p>\u3068\u3053\u308d\u3067\u3001\u30cd\u30c3\u30c8\u691c\u7d22\u3067Arduino\u306eString\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u691c\u7d22\u3057\u3066\u307f\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u3092\u884c\u3046\u30e1\u30bd\u30c3\u30c9\u304c\u3001\u3042\u305f\u304b\u3082\u5024\u3092\u8fd4\u3059\u304b\u306e\u3088\u3046\u306b\u66f8\u3044\u3066\u308b\u30b5\u30f3\u30d7\u30eb\u3084\u8aac\u660e\u306b\u51fa\u304f\u308f\u3059\u3002<br \/>\n<em>\u00a0 \u00a0void toLowerCase(void);<\/em><br \/>\n<em>\u00a0 \u00a0void toUpperCase(void);<\/em><br \/>\n<em>\u00a0 \u00a0void trim(void);<\/em><br \/>\n\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308c\u3070\u30a8\u30e9\u30fc\u306b\u306a\u308b\u304b\u3089\u5206\u304b\u308b\u3067\u3057\u3087\u3001\u3068\u3044\u3046\u3053\u3068\u304b\u306a\u3002<\/p>\n<h4>void handleCommand()<\/h4>\n<p>\u30ea\u30af\u30a8\u30b9\u30c8 \/ircmd \u3092\u53d7\u3051\u305f\u3068\u304dESP8266WebServer\u30af\u30e9\u30b9\u304b\u3089\u547c\u3070\u308c\u308b\u30ea\u30af\u30a8\u30b9\u30c8\u30cf\u30f3\u30c9\u30e9\u3002\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u3063\u3066IrLED\u3092\u4f7f\u3063\u3066\u9001\u51fa\u3059\u308b\u3002<\/p>\n<p>setup() \u306b\u304a\u3044\u3066<br \/>\n<em>\u00a0 \u00a0server.on(&#8220;\/irtest&#8221;, handleIrTest);<br \/>\n<\/em><em>\u00a0 \u00a0server.on(&#8220;\/ircmd&#8221;, handleCommand);<br \/>\n<\/em>\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u30cf\u30f3\u30c9\u30e9\u3092\u767b\u9332\u3057\u3066\u304a\u3051\u3070\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u305f\u3068\u304d\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u3002<\/p>\n<p><em>cmd<\/em>\u3068\u3044\u3046\u540d\u524d\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b16\u9032\u8868\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u5206\u89e3\u3057\u3066ircmd_t\u578b\u306e\u69cb\u9020\u4f53\u306b\u683c\u7d0d\u3059\u308b\u3002&#8217;$&#8217;\u306e\u6b21\u306e\u6587\u5b57\u304c\u9001\u4fe1\u30d5\u30a9\u30fc\u30de\u30c3\u30c8(N\u304a\u3088\u3073A)\u3001\u30c8\u30ec\u30fc\u30e9\u30fc(t)\u3092\u8868\u73fe\u3057\u3066\u3044\u308b\u3002\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u306f2\u6587\u5b57\u305a\u3064\u7a7a\u767d\u6587\u5b57\u3067\u533a\u5207\u3089\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h6>\u4f7f\u3044\u65b9<\/h6>\n<p>WiFi\u3092\u3082\u3064\u30ce\u30fc\u30c8PC\u3084\u30b9\u30de\u30db\u304b\u3089\u3001WROOM02\u306e\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306b\u63a5\u7d9a\u3059\u308b\u3002\u63a5\u7d9a\u3057\u305f\u3068\u304d\u306eIP\u30a2\u30c9\u30ec\u30b9\u306f\u3001\u4eca\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u3089\u3070\u6700\u521d\u306f192.168.4.1\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u3002\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u3044\u3066\u30a2\u30c9\u30ec\u30b9\u6b04\u306b\u3001\u4f8b\u3048\u3070T\u793e\u306eR\u3068\u3044\u3046\u30d6\u30e9\u30f3\u30c9\u306e\u30c6\u30ec\u30d3\u7528\u30ea\u30e2\u30b3\u30f3\u306e\u96fb\u6e90\u30dc\u30bf\u30f3\u306e\u30d5\u30ea\u3092\u3059\u308b\u306a\u3089\u3070\u3001<\/p>\n<p style=\"padding-left: 30px;\"><strong><em>http:\/\/192.168.4.1\/ircmd?cmd=$N 40 bf 12 ed<\/em><\/strong><\/p>\n<p>\u3068\u5165\u529b\u3057\u3066Enter\u3002URI\u306b\u7a7a\u767d\u306f\u8a31\u3055\u308c\u306a\u3044\u304c\u3001\u30d6\u30e9\u30a6\u30b6\u304c\u7a7a\u767d\u3092%20\u306b\u7f6e\u304d\u63db\u3048\u3066\u9001\u4fe1\u3057\u3066\u304f\u308c\u308b\u304b\u3089\u3001\u624b\u5165\u529b\u3059\u308b\u3068\u304d\u306f\u305d\u306e\u307e\u307e\u6253\u3066\u3070\u3088\u3044\u3002\u5148\u982d\u306e$N\u304cNEC\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u8868\u3057\u3066\u304a\u308a\u300140 bf 12 ed \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u3092\u9001\u51fa\u3055\u305b\u3066\u3044\u308b\u3002<\/p>\n<p>2\u30d5\u30ec\u30fc\u30e0\u304b\u3089\u306a\u308b\u30a8\u30a2\u30b3\u30f3\uff08AEHA\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\uff09\u306b\u5bfe\u3057\u3066\u30011\u30d5\u30ec\u30fc\u30e0\u76ee\u304c\u00a011 da 27 00 01\u30012\u30d5\u30ec\u30fc\u30e0\u76ee\u304c01 10 00 40 bf\u306a\u3089\u3070\u3001\u5148\u982d\u306e$A\u3067\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u6307\u5b9a\u3057\u3001\u30d5\u30ec\u30fc\u30e0\u306e\u533a\u5207\u308a\u3068\u3057\u3066\u30c8\u30ec\u30fc\u30e9\u30fc\u3092\u610f\u5473\u3059\u308b$t\u3092\u633f\u5165\u3057\u3066\u3001<\/p>\n<p style=\"padding-left: 30px;\"><strong><em>http:\/\/192.168.4.1\/ircmd?cmd=$A 11 da 27 00 01 $t 01 10 00 40 bf<\/em><\/strong><\/p>\n<p>\u3068\u3059\u308b\u3002<\/p>\n<p>WROOM02\u304c\u30b3\u30de\u30f3\u30c9\u3092\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u4fe1\u3059\u308b\u3068\u3001IrLED\u306b\u95a2\u3059\u308b\u51e6\u7406\u3092\u3057\u3066\u3044\u308b\u9593\u3001GPIO12\u306b\u63a5\u7d9a\u3057\u305f\u8d64\u8272\u306eLED\u304c\u70b9\u706f\u3059\u308b\u3002<\/p>\n<p>\u203b \u521d\u671f\u306e\u6295\u7a3f\u3067\u306f\u4f7f\u3044\u65b9\u304c\u629c\u3051\u3066\u3044\u305f\u306e\u3067\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h2>\n<p>IrLED\u7528\u306e\u56de\u8def\u3068\u30c8\u30e9\u30f3\u30b8\u30b9\u30bf\u3092\u4f7f\u3063\u305f\u30b9\u30a4\u30c3\u30c1\u30f3\u30b0\u306b\u3064\u3044\u3066\u5c11\u3005\u307e\u3068\u3081\u3066\u307f\u305f\u3002\u9593\u9055\u3044\u304c\u306a\u3051\u308c\u3070\u3088\u3044\u306e\u3067\u3059\u304c\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/66a1922a0e789602b64d4b693383c439.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-4973\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/09\/66a1922a0e789602b64d4b693383c439-552x414.jpg\" alt=\"WROOM02-IR2\" width=\"552\" height=\"414\" \/><\/a><\/p>\n<p>\u3044\u3064\u3082\u5909\u308f\u308a\u6620\u3048\u304c\u3057\u306a\u3044\u304c\u3001\u5c0f\u578b\u306e\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\u306b\u7d44\u307f\u4e0a\u3052\u305f\u3068\u3053\u308d\u3002IrLED\u3092\uff14\u672c\uff08\u76f4\u5217\uff12\u672c\u3092\u4e26\u5217\u306b\uff12\u7d44\uff09\u306b\u3057\u3088\u3046\u304b\u3068\u3082\u601d\u3063\u305f\u304c\u3001\u30ce\u30fc\u30c8PC\u306eUSB\u7aef\u5b50\u3092\u96fb\u6e90\u3068\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u308b\u3068\u3001\u96fb\u6d41\u3092\u6291\u3048\u6c17\u5473\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3042\u308b\u3002<\/p>\n<p>\u30c6\u30ec\u30d3\u3068\u30a8\u30a2\u30b3\u30f3\u3092\u4f7f\u3063\u3066\u52d5\u4f5c\u3092\u78ba\u8a8d\u3057\u305f\u304c\u826f\u597d\u306a\u7d50\u679c\u3060\u3063\u305f\u3002IrLED\u306e\u5148\u7aef\u3092\u5bb6\u96fb\u6a5f\u5668\u306b\u5411\u3051\u305f\u5834\u5408\u30015m\u7a0b\u5ea6\u306e\u8ddd\u96e2\u306a\u3089\u3070\u554f\u984c\u306a\u304b\u3063\u305f\u3002\u305f\u3060\u3001\u30a8\u30a2\u30b3\u30f3\u7528\u306e\u9577\u3044\u30b3\u30de\u30f3\u30c9\u30c7\u30fc\u30bf\u3092\u66f8\u304f\u306e\u306f\u3001\u30b3\u30d4\u30da\u3067\u6e08\u3080\u3068\u306f\u3044\u3048\u9762\u5012\u3060\u3063\u305f\u3002<\/p>\n<p>\u305b\u3063\u304b\u304f\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30b3\u30de\u30f3\u30c9\u3092\u9001\u308b\u306e\u3067\u3001\u305d\u308c\u3089\u3057\u3044html\u3092\u7528\u610f\u3057\u3066\u4f7f\u3044\u52dd\u624b\u3092\u3088\u304f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3042\u308b\u3002\u30a8\u30a2\u30b3\u30f3\u7528\u306e\u30ea\u30e2\u30b3\u30f3\u306b\u6c42\u3081\u3089\u308c\u308b\u5185\u90e8\u72b6\u614b\uff08\u30a8\u30a2\u30b3\u30f3\u52d5\u4f5c\u72b6\u614b\uff09\u306e\u7dad\u6301\u306f\u5f8c\u56de\u3057\u306b\u3059\u308b\u3068\u3057\u3066\u3001\u6b21\u306fSPIFFS\u3092\u4f7f\u3063\u3066WROOM02\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306bhtml\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d\u3001\u5bfe\u8c61\u306e\u5bb6\u96fb\u3054\u3068\u306b\u64cd\u4f5c\u30d1\u30cd\u30eb\uff08\u306e\u3088\u3046\u306a\u3082\u306e\uff09\u3092\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981 \u30ea\u30e2\u30b3\u30f3\u7528\u8d64\u5916\u7dda\u53d7\u4fe1\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u3063\u305f\u8abf\u67fb\u306b\u3088\u308a\u3001\u5bb6\u96fb\u7528\u30ea\u30e2\u30b3\u30f3\u304b\u3089\u306e\u4fe1\u53f7\u306e\u53d7\u4fe1\u3068\u3001\u30ea\u30e2\u30b3\u30f3\u304c\u9001\u4fe1\u3057\u3066\u3044\u308b\u5185\u5bb9\u306e\u30b3\u30fc\u30c9\u5316\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u6b21\u306f\u305d\u308c\u304c\u6b63\u3057\u3044\u306e\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u8d64\u5916\u7dda\u306e\u767a\u4fe1\u5074\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002\u89e3\u6790\u3057\u305f\u30b3 &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=4800\" 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\u306e1<\/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-4800","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\/4800","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=4800"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4800\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}