
{"id":13437,"date":"2022-01-27T11:52:03","date_gmt":"2022-01-27T02:52:03","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=13437"},"modified":"2022-01-30T17:23:21","modified_gmt":"2022-01-30T08:23:21","slug":"esp-wroom-02%e3%81%a8ina226%e3%81%a7wifi%e9%9b%bb%e6%b5%81%e3%83%a2%e3%83%8b%e3%82%bf","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=13437","title":{"rendered":"ESP-WROOM-02\u3068INA226\u3067WiFi\u96fb\u6d41\u30e2\u30cb\u30bf"},"content":{"rendered":"<h1>WROOM-02 + INA226 WiFi\u96fb\u6d41\u30e2\u30cb\u30bf<\/h1>\n<figure id=\"attachment_14169\" aria-describedby=\"caption-attachment-14169\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/ae34e8f4f91e052d0b2a92a99942ca67.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-14169\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/ae34e8f4f91e052d0b2a92a99942ca67-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-14169\" class=\"wp-caption-text\">INA226 + WROOM-02 \u96fb\u6d41\u30e2\u30cb\u30bf<\/figcaption><\/figure>\n<ul style=\"list-style-type: circle;\">\n<li>\u96fb\u6d41\uff0f\u96fb\u5727\u30e2\u30cb\u30bf\u30c7\u30d0\u30a4\u30b9\u306e<strong>INA226<\/strong>\u3068\u3001WiFi\u304c\u7c21\u5358\u306b\u4f7f\u3048\u308b<strong>ESP-WROOM-02<\/strong>\u3092\u4f7f\u3063\u3066\u3001\u96fb\u6d41\uff0f\u96fb\u5727\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3092WEB\u30d6\u30e9\u30a6\u30b6\u3067\u884c\u3046\u3002<\/li>\n<li>\u30d6\u30e9\u30a6\u30b6\u3067\u306f\u3001\u96fb\u6d41\uff0f\u96fb\u5727\uff0f\u96fb\u529b\u306e\u6570\u5024\u3067\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u306e\u4ed6\u3001\u96fb\u6d41\u304a\u3088\u3073\u96fb\u5727\u3092GoogleChart\u3067\u30b0\u30e9\u30d5\u306b\u3059\u308b\u3002<\/li>\n<li>USB\u30b3\u30cd\u30af\u30bf\u9593\u306eVBUS\u30e9\u30a4\u30f3\u3092\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3067\u3001\u5404\u7a2e\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306e\u6d88\u8cbb\u96fb\u6d41\u3092\u89b3\u6e2c\u3059\u308b\u305f\u3081\u306b\u4f5c\u6210\u3057\u305f\u3002<\/li>\n<li>LCD\u3084OLED\u306e\u8868\u793a\u30c7\u30d0\u30a4\u30b9\u3092\u4f7f\u3046\u3068<strong>\u6587\u5b57\u304c\u5c0f\u3055\u304f\u3066\u56f0\u308b<\/strong>\u306e\u3067\u3001PC\u3084\u30b9\u30de\u30db\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/li>\n<li>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3067\u304d\u308bWiFi\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u524d\u63d0\u3060\u304c\u3001AP\u30e2\u30fc\u30c9\u3092\u4f7f\u3048\u3070\u30cd\u30c3\u30c8\u63a5\u7d9a\u7121\u3057\u3067\u3082\u306a\u3093\u3068\u304b\u306a\u308b\u3002<\/li>\n<\/ul>\n<h2>INA226\u3092\u4f7f\u3063\u305f\u30e2\u30b8\u30e5\u30fc\u30eb(CJMCU-226)<\/h2>\n<p><strong>TI\u793e\u306e\u96fb\u6d41\u30e2\u30cb\u30bf\u30c7\u30d0\u30a4\u30b9INA226<\/strong>\u306e\u6a5f\u80fd\u3084\u7279\u5fb4\u3092\u7c21\u5358\u306b\u307e\u3068\u3081\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u611f\u3058\u304b\u3002<\/p>\n<ul>\n<li>15\u30d3\u30c3\u30c8\u5206\u89e3\u80fd\u306eA\/D\u30b3\u30f3\u30d0\u30fc\u30bf\u30fc\u3092\u5185\u8535\u3057\u3066\u304a\u308a\u3001VIN-\u3068VIN+\u306e\u9593\u306b\u306f\u3055\u3080<strong>\u30b7\u30e3\u30f3\u30c8\u62b5\u6297(R<sub>SHUNT<\/sub>)<\/strong>\u306e\u4e21\u7aef\u306b\u751f\u3058\u308b\u96fb\u4f4d\u5dee (<strong>\u30b7\u30e3\u30f3\u30c8\u96fb\u5727<\/strong>)\u3092A\/D\u5909\u63db\u3059\u308b\u3053\u3068\u304c\u4e3b\u305f\u308b\u6a5f\u80fd\u3002<\/li>\n<li><strong>I2C (SMBUS)<\/strong>\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u5099\u3048\u3066\u3044\u308b\u306e\u3067\u3001\u30de\u30a4\u30b3\u30f3\u306b\u63a5\u7d9a\u3057\u3066\u7c21\u5358\u306b\u4f7f\u3048\u308b\u3002<\/li>\n<li>GND\u306b\u5bfe\u3059\u308bVIN-(\u307e\u305f\u306fVIN+)\u96fb\u5727 (<strong>\u30d0\u30b9\u96fb\u5727<\/strong>) \u3082\u540c\u6642\u306bA\/D\u5909\u63db\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/li>\n<li>\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u5024\u3068\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u304b\u3089VIN+ &#8211; VIN-\u9593\u306e<strong>\u96fb\u6d41\u3092\u7b97\u51fa<\/strong>\u3057\u305f\u308a\u3001\u96fb\u6d41\u3068\u30d0\u30b9\u96fb\u5727\u304b\u3089<strong>\u96fb\u529b\u3092\u7b97\u51fa<\/strong>\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/li>\n<li>15\u30d3\u30c3\u30c8A\/D\u30b3\u30f3\u30d0\u30fc\u30bf\u304c\u8a08\u6e2c\u3067\u304d\u308b\u30b7\u30e3\u30f3\u30c8\u96fb\u5727 ( V<sub>SHUNT<\/sub> ) \u306e<strong>\u30d5\u30eb\u30b9\u30b1\u30fc\u30eb\u30ec\u30f3\u30b8\u306f\u00b181.92mV<\/strong>\u3067\u3042\u308b\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30c7\u30b8\u30bf\u30eb\u5316\u3057\u305f\u3068\u304d\u306e<strong>\u5206\u89e3\u80fd\u306f\u3001\u8a08\u7b97\u4e0a\u7d042.5\u03bcV<\/strong> (81.92 \u00f7 32768 \u2252 0.0025 ) \u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308b\u3002<\/li>\n<li>\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u5024 R<sub>SHUNT<\/sub>\u304c0.1\u03a9\u306e\u5834\u5408\u3001\u5909\u63db\u7d50\u679c\u306eLSB\u306f25\u03bcA\u3067\u3001\u30e2\u30cb\u30bf\u53ef\u80fd\u306a\u30d5\u30eb\u30b9\u30b1\u30fc\u30eb\u96fb\u6d41 ( I<sub>SHUNT<\/sub> )\u306f\u00b1819.2mA\u3068\u306a\u308b\u3002<\/li>\n<\/ul>\n<p>\u8a73\u7d30\u306f\u3001<a href=\"https:\/\/www.ti.com\/lit\/ds\/symlink\/ina226.pdf\" target=\"_blank\" rel=\"noopener\">\u30e1\u30fc\u30ab\u30fc\u306e\u30c7\u30fc\u30bf\u30b7\u30fc\u30c8<\/a>\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<p>\u4eca\u56de\u306fAliexpress\u3067\u8cb7\u3063\u305f\u30e1\u30fc\u30ab\u30fc\u3068\u3044\u3046\u304b\u51fa\u6240\u4e0d\u660e\u306e\u30e2\u30b8\u30e5\u30fc\u30eb (<strong>CJMCU-226<\/strong>) \u3092\u4f7f\u3063\u305f\u3002\u9001\u6599\u8fbc\u307f\u3067\uff11\u679a\u3042\u305f\u308a250\u5186\u304f\u3089\u3044\u3002\u65e5\u672c\u306eamazon\u3067\u3082\u5165\u624b\u53ef\u80fd\u3060\u308d\u3046\u3002<\/p>\n<figure id=\"attachment_13953\" aria-describedby=\"caption-attachment-13953\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/12\/86eb69a52f2eeb4d1b6dee4985baf6b7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13953 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/12\/86eb69a52f2eeb4d1b6dee4985baf6b7-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-13953\" class=\"wp-caption-text\">INA226 CJMCU-226 \u8868\u9762<\/figcaption><\/figure>\n<p>\u3053\u306e\u5199\u771f\u306e\u4e2d\u592e\u90e8\u3084\u3084\u4e0b\u306b\u3042\u308b10\u30d4\u30f3\u306eIC\u304cINA226\u3067\u3001\u305d\u306e\u4e0a\u306b\u306f0.1\u03a9\u306e\u30b7\u30e3\u30f3\u30c8\u62b5\u6297( R100 \u3068\u8868\u8a18)\u304c\u8f09\u3063\u3066\u3044\u308b\u3002\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u306e\u5199\u771f\u5de6\u5074\u304cVIN+\u3001\u53f3\u5074\u304cVIN- \u306b\u63a5\u7d9a\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u306e\u4e0a\u306e2\u3064\u306e\u7a74(5mm\u9593\u9694)\u306b\u30bf\u30fc\u30df\u30ca\u30eb\u30d6\u30ed\u30c3\u30af\u3092\u30cf\u30f3\u30c0\u4ed8\u3051\u3057\u3066\u5229\u7528\u3057\u3066\u3044\u308b\u304c\u3001\u624b\u6301\u3061\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u30d6\u30ed\u30c3\u30af\u306e\u90fd\u5408\u3067\u3001\u30b7\u30e3\u30c3\u30c8\u62b5\u6297\u306b\u4e57\u308a\u4e0a\u3052\u3066\u3057\u307e\u3063\u305f\u3002<\/p>\n<figure id=\"attachment_14137\" aria-describedby=\"caption-attachment-14137\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/0a18d33fd83123eea7dee29a8763b440.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14137 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/0a18d33fd83123eea7dee29a8763b440-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-14137\" class=\"wp-caption-text\">INA226\u3068\u30bf\u30fc\u30df\u30ca\u30eb\u30d6\u30ed\u30c3\u30af<\/figcaption><\/figure>\n<figure id=\"attachment_13954\" aria-describedby=\"caption-attachment-13954\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/12\/1761d01db5e68cb9502433d8978081a3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13954 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2021\/12\/1761d01db5e68cb9502433d8978081a3-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-13954\" class=\"wp-caption-text\">INA226 CJMCU-226 \u88cf\u9762<\/figcaption><\/figure>\n<p>\u3053\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u56de\u8def\u56f3\u306b\u3057\u3066\u307f\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3088\u3046\u3060\u3063\u305f\u3002<\/p>\n<figure id=\"attachment_14133\" aria-describedby=\"caption-attachment-14133\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/INA226_Typical.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-14133\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/INA226_Typical-552x345.png\" alt=\"\" width=\"552\" height=\"345\" \/><\/a><figcaption id=\"caption-attachment-14133\" class=\"wp-caption-text\">INA226\u30e2\u30b8\u30e5\u30fc\u30eb<\/figcaption><\/figure>\n<p>\u51fa\u8377\u6642\u306e<strong>I2C\u30a2\u30c9\u30ec\u30b9\u306f0x40<\/strong> \u3067\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u88cf\u9762\u306eA0\u3084A1\u3092VCC\u3068\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3067\u3001\u305d\u306e\u4ed63\u901a\u308a\u306e\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u304b\u3089\u3001\u540c\u3058\u30de\u30a4\u30b3\u30f3\u306b\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u3092\u5909\u3048\u305f\u8907\u6570\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u63a5\u7d9a\u3057\u3066\u304a\u304f\u3053\u3068\u3082\u3067\u304d\u308b\u3002<\/p>\n<p>\u96fb\u6e90\u96fb\u6d41\u3092\u30e2\u30cb\u30bf\u3059\u308b\u5834\u5408\u3001\u5bfe\u8c61\u30c7\u30d0\u30a4\u30b9\u306b\u4e0e\u3048\u308b\u96fb\u6e90\u3092\u5148\u306bINA226\u306eVIN+\u306b\u63a5\u7d9a\u3057\u3001VIN-\u3092\u30c7\u30d0\u30a4\u30b9\u306e\u96fb\u6e90(VCC)\u306b\u63a5\u7d9a\u3059\u308b\u3002\u96fb\u6d41\u3060\u3051\u3092\u30e2\u30cb\u30bf\u3059\u308b\u3068\u304d\u306f\u3001\u5bfe\u8c61\u30c7\u30d0\u30a4\u30b9\u3068INA219\u306eGND\u3092\u63a5\u7d9a\u3059\u308b\u5fc5\u8981\u306f\u306a\u3044\u304c\u3001\u30d0\u30b9\u96fb\u5727(\u30c7\u30d0\u30a4\u30b9\u306b\u4f9b\u7d66\u3055\u308c\u308bVIN-\u306e\u96fb\u5727)\u3082\u30e2\u30cb\u30bf\u3057\u305f\u3044\u3068\u304d\u306b\u306f\u3001GND\u3092\u5171\u901a\u306b\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h2>\u56de\u8def\u56f3<\/h2>\n<p>\u304a\u305d\u3089\u304f2015\u5e74\u306b\u79cb\u6708\u3067\u8cb7\u3063\u305f<a href=\"https:\/\/akizukidenshi.com\/catalog\/g\/gK-09758\/\" target=\"_blank\" rel=\"noopener\"> \uff25\uff33\uff30\uff0d\uff37\uff32\uff2f\uff2f\uff2d\uff0d\uff10\uff12\u3000\uff24\uff29\uff30\u5316\u30ad\u30c3\u30c8 (AE-ESP-WROOM-02)<\/a> \u304c\u673a\u306e\u9685\u306b\u8ee2\u304c\u3063\u3066\u3044\u305f\u306e\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7528\u306e\u30de\u30a4\u30b3\u30f3\u3068\u3057\u3001\u5168\u4f53\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u305f\u3002INA226\u3068\u306e\u63a5\u7d9a\u306fI2C\u306a\u306e\u3067\u3001WROOM-02\u3092\u4f7f\u3063\u305f\u958b\u767a\u30dc\u30fc\u30c9\u306a\u3089\u3070\u304a\u304a\u3088\u305d\u5927\u4e08\u592b\u3060\u308d\u3046\u3002<\/p>\n<figure id=\"attachment_14134\" aria-describedby=\"caption-attachment-14134\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/WROOM02-AE-INA226.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-14134\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/WROOM02-AE-INA226-552x394.png\" alt=\"\" width=\"552\" height=\"394\" \/><\/a><figcaption id=\"caption-attachment-14134\" class=\"wp-caption-text\">INA226 + WROOM-02<\/figcaption><\/figure>\n<p>\u3075\u3064\u3046\u306e\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\u306e\u4e0a\u3067\u3053\u308c\u3092\u7d44\u307f\u7acb\u3066\u3066\u3001INA226\u30e2\u30b8\u30e5\u30fc\u30eb\u3001AE-FT234X(USB-\u30b7\u30ea\u30a2\u30eb\u5909\u63db\u30e2\u30b8\u30e5\u30fc\u30eb)\u3001+3.3V\u7528\u96fb\u6e90\u30e2\u30b8\u30e5\u30fc\u30eb(AMS1117-3.3\u4f7f\u7528)\u306a\u3069\u3092\u8f09\u305b\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<figure id=\"attachment_14132\" aria-describedby=\"caption-attachment-14132\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/d8070dc2b0dc8cff28f2d12387634a72.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-14132\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/d8070dc2b0dc8cff28f2d12387634a72-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-14132\" class=\"wp-caption-text\">INA226 + WROOM-02<\/figcaption><\/figure>\n<ul>\n<li>INA226\u306e<strong>I2C\u30a2\u30c9\u30ec\u30b9\u306f0x40<\/strong> (\u30c7\u30d5\u30a9\u30eb\u30c8)\u3068\u3057\u305f\u3002<\/li>\n<li>INA226\u306e<strong>ALE<\/strong>\u306f\u3001\u30a2\u30b5\u30fc\u30c8\u6642LOW\u306e\u30aa\u30fc\u30d7\u30f3\u30b3\u30ec\u30af\u30bf\u306b\u8a2d\u5b9a\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u30c8\u30ea\u30ac\u30e2\u30fc\u30c9\u306e\u5909\u63db\u958b\u59cb\u6307\u793a\u3067HIGH\u3068\u306a\u308a\u3001\u5909\u63db\u3084\u8a08\u7b97\u304c\u5b8c\u4e86\u3057\u3066\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf\u304b\u3089\u65b0\u3057\u3044\u5024\u304c\u8aad\u51fa\u3057\u53ef\u80fd\u3068\u306a\u308b\u3068LOW\u3068\u306a\u308b\u3002\u3053\u308c\u3092\u4f7f\u3063\u3066\u5909\u63db\u5b8c\u4e86\u3092\u691c\u51fa\u3059\u308b\u3002<\/li>\n<li>\u30de\u30a4\u30b3\u30f3\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u3068\u304d\u306f\u3001<strong>SW1(EN)<\/strong>\u3092\u5358\u72ec\u3067\u62bc\u3057\u3066\u96e2\u3059\u3002<\/li>\n<li>\u30b9\u30b1\u30c3\u30c1\u3084\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u3092\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u8ee2\u9001\u3059\u308b\u3068\u304d\u306f\u3001SW1 \u3092\u62bc\u3057\u305f\u307e\u307eSW2\u3092\u62bc\u3057\u3001SW1\u3001 SW2\u306e\u9806\u306b\u96e2\u3057\u3066\u3084\u308b(\u30ea\u30bb\u30c3\u30c8\u6642IO0=LOW)\u3002<\/li>\n<li><strong>+3.3V\u96fb\u6e90\u30e2\u30b8\u30e5\u30fc\u30eb<\/strong>\u306f\u3001+3.3V\u51fa\u529b(\uff5e800mA)\u306e\u5b9a\u96fb\u5727\u30ec\u30ae\u30e5\u30ec\u30fc\u30bf(<strong>AMS-1117-3.3)<\/strong>\u3068\u5468\u8fba\u306b\u5fc5\u8981\u306a\u30b3\u30f3\u30c7\u30f3\u30b5\u3001LED\u3001\u62b5\u6297\u304c\u8f09\u3063\u305f\u4fbf\u5229\u306a\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u3001\u4ee5\u524damazon\u306710\u500b500\u5186\u304f\u3089\u3044\u3067\u5165\u624b\u3057\u305f\u3082\u306e\u3002\n<p><figure id=\"attachment_6256\" aria-describedby=\"caption-attachment-6256\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/08\/abef77fed1333774b4c41511c8eacd04.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6256 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2017\/08\/abef77fed1333774b4c41511c8eacd04-552x414.jpg\" alt=\"\" width=\"552\" height=\"414\" \/><\/a><figcaption id=\"caption-attachment-6256\" class=\"wp-caption-text\">AMS1117\u30e2\u30b8\u30e5\u30fc\u30eb<\/figcaption><\/figure><\/li>\n<li>\u96fb\u6e90\u7528USB MicroB\u30b3\u30cd\u30af\u30bf\u306fAMS1117\u306e\u5165\u529b\u7528\u3067\u3001USB\u30cf\u30d6\u306a\u3069\u304b\u3089+5V\u3092\u4f9b\u7d66\u3059\u308b\u3002<\/li>\n<li><strong>USB-\u30b7\u30ea\u30a2\u30eb\u5909\u63db\u30e2\u30b8\u30e5\u30fc\u30eb AE-FT234X<\/strong>\u306fWROOM-02\u3078\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u8ee2\u9001\u3084\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306e\u305f\u3081\u306b\u63a5\u7d9a\u3057\u305f\u3002\u305f\u3060\u3001\u4eca\u56de\u306e\u30b9\u30b1\u30c3\u30c1\u306b\u306f<strong>OTA\u30e9\u30a4\u30d6\u30e9\u30ea\u3082\u7d44\u307f\u8fbc\u3080<\/strong>\u306e\u3067\u3001\u521d\u671f\u306e\u30b9\u30b1\u30c3\u30c1\u8ee2\u9001\u3068\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u3067\u306e\u52d5\u4f5c\u78ba\u8a8d\u304c\u6e08\u3081\u3070\u5916\u3057\u3066\u3057\u307e\u3048\u308b\u3002\u30dc\u30fc\u30c9\u306e\u96fb\u6e90\u7528\u306b\u306f\u5225\u9014USB\u30b3\u30cd\u30af\u30bf\u3092\u7f6e\u3044\u305f\u3002<\/li>\n<\/ul>\n<h1>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2<\/h1>\n<h3>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h3>\n<p>\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u306f\u5f53\u30b5\u30a4\u30c8\u306e <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/download\/ESP_INA226_httpd.zip\">https:\/\/okiraku-camera.tokyo\/blog\/download\/ESP_INA226_httpd.zip<\/a> \u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/download\/ESP_INA226_httpd.sum\" target=\"_blank\" rel=\"noopener\">\u30c1\u30a7\u30c3\u30af\u30b5\u30e0(SHA256)\u306f\u3053\u3061\u3089<\/a>\u3002MIT\u30e9\u30a4\u30bb\u30f3\u30b9\u3002<\/p>\n<p>ESP_INA226_httpd.zip \u3092\u5c55\u958b\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306b\u8a18\u3059\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u304c\u5c55\u958b\u3055\u308c\u307e\u3059\u3002Arduino\u30b9\u30b1\u30c3\u30c1\u7528\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u9069\u5f53\u306a\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u3063\u3066\u305d\u306e\u4e2d\u306b\u683c\u7d0d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u30d5\u30a1\u30a4\u30eb\u69cb\u6210\u3068\u4f7f\u3044\u65b9<\/h3>\n<p>\u69cb\u6210\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<table style=\"width: 100%; border-collapse: collapse;\">\n<tbody>\n<tr>\n<td style=\"width: 30%;\"><strong>\u30d5\u30a1\u30a4\u30eb\u540d<\/strong><\/td>\n<td style=\"width: 70%;\"><strong>\u5185\u5bb9<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>ESP_INA226_httpd.ino<\/strong><\/td>\n<td>\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u3002<br \/>\n<strong>ESP8266 Arduino Core<\/strong> \u306b\u542b\u307e\u308c\u3066\u3044\u308b <em>ESP8266WebServer<\/em> \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u305fWEB\u30b5\u30fc\u30d0\u30fc\u3092\u5b9f\u88c5\u3002WiFi\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u3057\u3066\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u63a5\u7d9a\u3067\u304d\u308bWiFi\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u63a5\u7d9a\u3067\u304d\u306a\u3044\u5834\u5408\u3082\u8003\u616e\u3057\u3066\u3001\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u30e2\u30fc\u30c9\u3067\u306e\u30d3\u30eb\u30c9\u3082\u53ef\u80fd\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>esp_ota.h<\/strong><\/td>\n<td>OTA\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>ina226_if.cpp<\/strong><\/td>\n<td>INA226\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3002Wire\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066INA226\u3068I2C\u901a\u4fe1\u3092\u884c\u3046\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>ina226_if.h<\/strong><\/td>\n<td>INA226\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u7528\u306e\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3002<br \/>\nina226_if \u30af\u30e9\u30b9\u306e\u5b9a\u7fa9\u3092\u542b\u3093\u3067\u3044\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td><strong>data\/index.html<\/strong><\/td>\n<td>\u30d6\u30e9\u30a6\u30b6\u3067\u52d5\u304b\u3059html\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u306b\u5b9f\u88c5\u3057\u305fWEB\u30b5\u30fc\u30d0\u30fc\u3068\u901a\u4fe1\u3057\u3001\u96fb\u6d41\u3084\u96fb\u5727\u306e\u53d6\u5f97\u3001\u8868\u793a\u3001\u30b0\u30e9\u30d5\u5316\u3001INA226\u306e\u52d5\u4f5c\u8a2d\u5b9a\u306a\u3069\u3092\u884c\u3046\u3002<\/p>\n<p>WROOM-02\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0(LittleFS)\u306b\u683c\u7d0d\u3059\u308b\u524d\u63d0\u3060\u304c\u3001PC\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u76f4\u63a5\u30d6\u30e9\u30a6\u30b6\u306b\u8aad\u3093\u3067\u3082\u52d5\u4f5c\u3059\u308b\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>WROOM-02 (ESP8266)\u3067\u306e\u30d3\u30eb\u30c9<\/h3>\n<p>ESP8266\u7528\u306e\u30dc\u30fc\u30c9\u3092\u7d44\u307f\u7acb\u3066\u30b9\u30b1\u30c3\u30c1\u3092\u66f8\u304f\u306e\u306f\u4e45\u3057\u3076\u308a\u3060\u3063\u305f\u306e\u3067\u3001ESP8266 Community\u306b\u3088\u308b\u3001<strong>ESP8266 Arduino Core (3.0.2)\u00a0<\/strong> \u3092<strong>Arduino IDE 1.8.15<\/strong>\u306b\u65b0\u305f\u306b\u5c0e\u5165\u3057\u3066\u5229\u7528\u3057\u305f\u3002\u307e\u305f\u3001\u4eca\u56de\u306e\u30b9\u30b1\u30c3\u30c1\u306b\u306f<strong>OTA\u7528\u306e\u30e9\u30a4\u30d6\u30e9\u30ea (ArduinoOTA)<\/strong> \u3092\u7d44\u307f\u8fbc\u3093\u3067\u3044\u308b\u3002<\/p>\n<p>Arduino IDE\u306e\u30c4\u30fc\u30eb\u30e1\u30cb\u30e5\u30fc\u3092\u958b\u304f\u3068\u4ee5\u524d\u306b\u3088\u304f\u5229\u7528\u3057\u3066\u3044\u305f\u3053\u308d\u3088\u308a\u3082\u8a2d\u5b9a\u9805\u76ee\u304c\u5897\u3048\u3066\u3044\u3066\u3001\u304a\u3082\u306a\u3068\u3053\u308d\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u305f\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 28.27%;\"><strong>\u9805\u76ee<\/strong><\/td>\n<td style=\"width: 44.5147%;\"><strong>\u8a2d\u5b9a<\/strong><\/td>\n<td style=\"width: 27.2152%;\"><strong>\u5099\u8003<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">\u30dc\u30fc\u30c9<\/td>\n<td style=\"width: 44.5147%;\">Generic ESP8266 Module<\/td>\n<td style=\"width: 27.2152%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">CPU Frequency<\/td>\n<td style=\"width: 44.5147%;\">80MHz<\/td>\n<td style=\"width: 27.2152%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">Crystal Frequency<\/td>\n<td style=\"width: 44.5147%;\">26MHz<\/td>\n<td style=\"width: 27.2152%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">Reset method<\/td>\n<td style=\"width: 44.5147%;\">no dtr (ck)<\/td>\n<td style=\"width: 27.2152%;\">Tx\/Rx\u3057\u304b\u63a5\u7d9a\u3057\u3066\u3044\u306a\u3044\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">Flash Size<\/td>\n<td style=\"width: 44.5147%;\">4MB\u00a0 (FS:2MB OTA;\uff5e1019KB)<\/td>\n<td style=\"width: 27.2152%;\">OTA\u5bfe\u5fdc\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">Flash Mode<\/td>\n<td style=\"width: 44.5147%;\">QIO<\/td>\n<td style=\"width: 27.2152%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">Flash Frequemcy<\/td>\n<td style=\"width: 44.5147%;\">40MHz<\/td>\n<td style=\"width: 27.2152%;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.27%;\">MMU<\/td>\n<td style=\"width: 44.5147%;\">32KB ICACHE, 32KB IRAM<\/td>\n<td style=\"width: 27.2152%;\">\u521d\u671f\u8a2d\u5b9a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4eca\u56de\u5229\u7528\u3057\u305fWROOM-02\u306eFlash Size \u306f4MBytes\u306e\u306f\u305a\u306a\u306e\u3067\u3001FS (File System)\u30b5\u30a4\u30ba\u30922MB\u3068\u3057\u3001OTA\u7528\u306b\u4e0a\u9650\u306e1019KB\u3092\u9078\u629e\u3057\u305f\u3002OTA\u3092\u4f7f\u3046\u5834\u5408\u3001\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u306f\u30b9\u30b1\u30c3\u30c1\u30b5\u30a4\u30ba\u306e2\u500d\u306e\u7a7a\u304d\u304c\u5fc5\u8981\u306b\u306a\u308b\u304b\u3089\u3001FS\u30922MB\u3068\u3059\u308c\u3070\u7d041MB\u306b\u5236\u9650\u3055\u308c\u308b\u306e\u306f\u3084\u3080\u3092\u5f97\u306a\u3044\u3002\u4eca\u56de\u306e\u30b9\u30b1\u30c3\u30c1\u306e\u30b5\u30a4\u30ba\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<h5>sizes.py \u306e\u51fa\u529b<\/h5>\n<pre class=\"lang:default decode:true \">Executable segment sizes:\r\nICACHE : 32768           - flash instruction cache \r\nIROM   : 336708          - code in flash         (default or ICACHE_FLASH_ATTR) \r\nIRAM   : 28624   \/ 32768 - code in IRAM          (IRAM_ATTR, ISRs...) \r\nDATA   : 1504  )         - initialized variables (global, static) in RAM\/HEAP \r\nRODATA : 2312  ) \/ 81920 - constants             (global, static) in RAM\/HEAP \r\nBSS    : 26888 )         - zeroed variables      (global, static) in RAM\/HEAP \r\n<\/pre>\n<p>size.py\u306f\u8a73\u7d30\u306a\u30bb\u30b0\u30e1\u30f3\u30c8\u30b5\u30a4\u30ba\u3092\u8868\u793a\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n<h5>xtensa-lx106-elf-size \u306e\u51fa\u529b<\/h5>\n<p>arduino\u5171\u901a\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u72b6\u6cc1\u3002<\/p>\n<pre class=\"lang:default decode:true\">\u6700\u59271044464\u30d0\u30a4\u30c8\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306e\u3046\u3061\u3001\u30b9\u30b1\u30c3\u30c1\u304c369148\u30d0\u30a4\u30c8\uff0835%\uff09\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\r\n\u6700\u592781920\u30d0\u30a4\u30c8\u306eRAM\u306e\u3046\u3061\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u304c30704\u30d0\u30a4\u30c8\uff0837%\uff09\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306751216\u30d0\u30a4\u30c8\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\r\n<\/pre>\n<p>xtensa-lx106-elf-size\u306e\u51fa\u529b\u306f\u3001size.py\u306e\u51fa\u529b\u3092\u307e\u3068\u3081\u305f\u5024\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u3002<\/p>\n<ul>\n<li>\u30d5\u30e9\u30c3\u30b7\u30e5\u30b5\u30a4\u30ba = <span style=\"font-family: 'courier new', courier, monospace;\">IROM + IRAM + DATA + RODATA\u00a0<\/span><\/li>\n<li>RAM\u30b5\u30a4\u30ba = <span style=\"font-family: 'courier new', courier, monospace;\">DATA + RODATA + BSS\u00a0<\/span><\/li>\n<\/ul>\n<p><strong>IROM<\/strong>\u304a\u3088\u3073<strong>IRAM<\/strong> \u306e\u5404\u30bb\u30b0\u30e1\u30f3\u30c8\u306b\u306f\u30b3\u30fc\u30c9\u304c\u914d\u7f6e\u3055\u308c\u308b\u3002<strong>IROM<\/strong>\u306f\u30d5\u30e9\u30c3\u30b7\u30e5\u30e1\u30e2\u30ea\u306b\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u3075\u3064\u3046\u306e\u30b3\u30fc\u30c9\u306e\u30b5\u30a4\u30ba\u3001<strong>IRAM<\/strong>\u306fESP8266\u306eInstruction RAM\u306b\u914d\u7f6e\u3055\u308c\u308b\u30b3\u30fc\u30c9\u306e\u30b5\u30a4\u30ba\u3092\u8868\u3057\u3066\u3044\u308b\u3002\u30b3\u30a2\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u306f\u3001\u5272\u308a\u8fbc\u307f\u30cf\u30f3\u30c9\u30e9\u3084\u3088\u304f\u4f7f\u308f\u308c\u305d\u3046\u306a\u95a2\u6570\u306a\u3069\u3001IRAM_ATTR \u3068\u3044\u3046\u5c5e\u6027\u4ed8\u304d\u3067\u5ba3\u8a00\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p><strong>ICACHE<\/strong> (Instruction Cache)\u306f\u3001\u5b9f\u884c\u306e\u305f\u3081\u306b\u30d5\u30e9\u30c3\u30b7\u30e5\u304b\u3089\u8aad\u307f\u51fa\u3059\u30ad\u30e3\u30c3\u30b7\u30e5\u9818\u57df\u306e\u5927\u304d\u3055\u3067\u3001\u30d3\u30eb\u30c9\u6642\u306e\u9818\u57df\u5206\u3051\u306b\u306f\u95a2\u4fc2\u3057\u306a\u3044\u3002<\/p>\n<p><strong>DATA<\/strong>\u306f\u521d\u671f\u5024\u3092\u3082\u3064\u30c7\u30fc\u30bf\u3067\u3001\u30d6\u30fc\u30c8\u6642\u306b\u30d5\u30e9\u30c3\u30b7\u30e5\u304b\u3089RAM\u306b\u521d\u671f\u5024\u304c\u8ee2\u9001\u3055\u308c\u308b\u3002<strong>RODATA<\/strong>\u306f\u305f\u3076\u3093 const \u30c7\u30fc\u30bf\u3067\u3001\u3084\u306f\u308a\u30d5\u30e9\u30c3\u30b7\u30e5\u304b\u3089RAM\u306b\u8ee2\u9001\u3055\u308c\u308b\u3002\u6700\u5f8c\u306e<strong>BSS<\/strong>\u306f\u672a\u521d\u671f\u5316(\u521d\u671f\u5024\u3092\u6301\u305f\u306a\u3044)\u30c7\u30fc\u30bf\u306e\u30d6\u30ed\u30c3\u30af\u3067\u3001\u5909\u6570\u578b\u306b\u3088\u3063\u3066\u306f0\u3067\u521d\u671f\u5316\u3055\u308c\u308b\u3002<\/p>\n<h3>OTA\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u7d44\u307f\u8fbc\u307f<\/h3>\n<p>OTA (Over-The-Air) \u3068\u306f\u3001WiFi\u306a\u3069\u306e\u7121\u7dda\u901a\u4fe1\u3092\u7d4c\u7531\u3057\u3066\u30d5\u30e9\u30c3\u30b7\u30e5\u5185\u306e\u30b9\u30b1\u30c3\u30c1\u3084\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3001ESP8266 Arduino Core\u306b<strong> <em>ArduinoOTA<\/em>\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea<\/strong>\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3002<\/p>\n<p>OTA\u3092\u5229\u7528\u3057\u3066\u66f4\u65b0\u3092\u884c\u3044\u305f\u3044\u30b9\u30b1\u30c3\u30c1\u306b\u306f\u3001OTA\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7d44\u307f\u8fbc\u3093\u3067\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb (<em>esp_ota.h<\/em>) \u3092\u7528\u610f\u3057\u305f\u3002\u3053\u308c\u306f\u3001ArduinoOTA\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b9\u30b1\u30c3\u30c1\u4f8b\u306b\u542b\u307e\u308c\u3066\u3044\u308b <em>BasicOTA.ino <\/em>\u304b\u3089\u5fc5\u8981\u306a\u90e8\u5206\u3092\u629c\u7c8b\u3057\u305f\u3082\u306e\u3002<\/p>\n<pre class=\"toolbar:1 nums-toggle:true lang:default decode:true \" title=\"esp_ota.h\">#include &lt;ESP8266mDNS.h&gt;\r\n#include &lt;WiFiUdp.h&gt;\r\n#include &lt;ArduinoOTA.h&gt;\r\n#if !defined(__ESP_OTA_H__)\r\n#define __ESP_OTA_H__\r\n\/\/ BasicOTA.ino\u304b\u3089\u6301\u3063\u3066\u304d\u305f\r\nvoid ota_setup( const char* hostname = 0) {\r\n\tif (hostname)\r\n\t\tArduinoOTA.setHostname(hostname);\r\n  ArduinoOTA.onStart([]() {\r\n    String type;\r\n    if (ArduinoOTA.getCommand() == U_FLASH)\r\n      type = \"sketch\";\r\n    else {\/\/ U_FS\r\n      type = \"filesystem\";\r\n      LittleFS.end();\r\n    }\r\n    Serial.println(\"Start updating \" + type);\r\n  });\r\n  ArduinoOTA.onEnd([]() { Serial.println(\"\\nEnd\"); });\r\n  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {\r\n    Serial.printf(\"Progress: %u%%\\r\", (progress \/ (total \/ 100)));\r\n  });\r\n  ArduinoOTA.onError([](ota_error_t error) {\r\n    Serial.printf(\"Error[%u]: \", error);\r\n    if (error == OTA_AUTH_ERROR) {\r\n      Serial.println(\"Auth Failed\");\r\n    } else if (error == OTA_BEGIN_ERROR) {\r\n      Serial.println(\"Begin Failed\");\r\n    } else if (error == OTA_CONNECT_ERROR) {\r\n      Serial.println(\"Connect Failed\");\r\n    } else if (error == OTA_RECEIVE_ERROR) {\r\n      Serial.println(\"Receive Failed\");\r\n    } else if (error == OTA_END_ERROR) {\r\n      Serial.println(\"End Failed\");\r\n    }\r\n  });\r\n  ArduinoOTA.begin();\r\n}\r\nvoid handle_ota() { ArduinoOTA.handle(); }\r\n#endif \/\/ __ESP_OTA_H__<\/pre>\n<p>\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u306e setup() \u5185\u3067<span class=\"lang:default decode:true crayon-inline\">ota_setup( OTA_PORT_NAME ); <\/span>\u00a0\u3068\u3057\u3066OTA\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u7d44\u307f\u8fbc\u307f\u3092\u884c\u3044\u3001loop()\u5185\u3067<span class=\"lang:default decode:true crayon-inline\">handle_ota();<\/span> \u3092\u547c\u3073\u51fa\u3059\u3088\u3046\u306b\u3059\u308c\u3070\u3001Arduino IDE\u306b\u8ee2\u9001\u7528\u306e\u30dd\u30fc\u30c8\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308b (\u521d\u56de\u306f\u30b7\u30ea\u30a2\u30eb\u8ee2\u9001\u3068ESP8266\u306e\u624b\u52d5\u30ea\u30bb\u30c3\u30c8\u304c\u5fc5\u8981)\u3002<\/p>\n<p>\u4eca\u56de\u306e\u30b9\u30b1\u30c3\u30c1\u306f\u3082\u3068\u3082\u3068WiFi\u3092\u4f7f\u3046\u524d\u63d0\u306e\u3082\u306e\u306a\u306e\u3067 <em>esp_ota.h<\/em> \u5185\u3067WiFi\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u30b3\u30fc\u30c9\u306f\u5165\u308c\u3066\u3044\u306a\u3044\u304c\u3001\u30b9\u30b1\u30c3\u30c1\u81ea\u4f53\u306bWiFi\u63a5\u7d9a\u304c\u306a\u3044\u3082\u306e\u306a\u3089 <em>ota_setup()<\/em> \u5185\u3067<span class=\"lang:default decode:true crayon-inline\">WiFi.begin(ssid, password);<\/span> \u3068\u304b\u3084\u3063\u3066\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3057\u3066\u304a\u304f\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p><em>ota_setup()<\/em> \u306e\u5f15\u6570\u3068\u3057\u3066 <em>&#8220;ina226_ota_port&#8221;\u00a0<\/em> \u3068\u3044\u3046\u540d\u524d\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3044\u308b\u306e\u3067\u3001Arduino IDE\u306e\u30c4\u30fc\u30eb\uff0f\u30b7\u30ea\u30a2\u30eb\u30dd\u30fc\u30c8\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u305f (IP\u30a2\u30c9\u30ec\u30b9\u306f\u3001192.168.63.10)\u3002<\/p>\n<figure id=\"attachment_14139\" aria-describedby=\"caption-attachment-14139\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/0d40a5e4a645fc6b96e767d64ac0878e.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-14139 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/0d40a5e4a645fc6b96e767d64ac0878e-552x152.png\" alt=\"\" width=\"552\" height=\"152\" \/><\/a><figcaption id=\"caption-attachment-14139\" class=\"wp-caption-text\">OTA\u8ee2\u9001\u30dd\u30fc\u30c8<\/figcaption><\/figure>\n<h3>WiFi\u8a2d\u5b9a\u306b\u3064\u3044\u3066<\/h3>\n<ul>\n<li>\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u306e<em> void setup_wifi()<\/em> \u3067\u3001WiFi\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306essid\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3001IP\u30a2\u30c9\u30ec\u30b9\u3001\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u30a2\u30c9\u30ec\u30b9\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/li>\n<li>GoogleChart\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089GoogleChart\u7528\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308b(\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30ed\u30fc\u30ab\u30eb\u306b\u30b3\u30d4\u30fc\u3057\u3066\u306e\u4f7f\u7528\u306f\u8a31\u8afe\u3055\u308c\u3066\u3044\u306a\u3044)\u3002<\/li>\n<li><em>index.html<\/em> \u3092PC\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u306e\u306b\u4fbf\u5229\u306a\u3088\u3046\u306b\u56fa\u5b9aIP\u30a2\u30c9\u30ec\u30b9\u3068\u3057\u3066\u3044\u308b (\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u3067\u306f\u306a\u304fPC\u304b\u3089\u30d6\u30e9\u30a6\u30b6\u306b\u8aad\u307f\u8fbc\u3093\u3060\u5834\u5408\u3001Javascript\u306b\u30b5\u30fc\u30d0\u30fc\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3057\u3066\u3084\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081)\u3002<\/li>\n<li><em>setup_wifi()<\/em>\u00a0 \u5185\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6761\u4ef6\u5206\u3051\u3057\u3066\u3042\u308b\u306e\u3067\u3001WROOM-02\u3092AP\u30e2\u30fc\u30c9\u3067\u30d3\u30eb\u30c9\u3059\u308b\u969b\u306b\u306f\u3001\u6700\u521d\u3092#if 0 \u3068\u3057\u3066\u304b\u3089\u30d3\u30eb\u30c9\u3059\u308b\u3002<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\" style=\"padding-left: 80px;\">#if 1\r\nWiFi\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u7528\u306e\u30b3\u30fc\u30c9\r\n#else\r\nWiFi\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u7528\u306e\u30b3\u30fc\u30c9\r\n#endif<\/pre>\n<h3>INA226\u3068\u306e\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9<\/h3>\n<p>INA226\u3092I2C\u7d4c\u7531\u3067\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3059\u308b\u90e8\u5206\u306f\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u3057\u3066\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u72ec\u7acb\u3055\u305b\u305f ( <em>ina226_if.cpp \/ .h<\/em> )\u3002\u8a73\u3057\u304f\u306f\u6dfb\u4ed8\u306e\u30bd\u30fc\u30b9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3002<\/p>\n<h4>INA226\u306e\u8a2d\u5b9a\u3084\u30c7\u30fc\u30bf\u306e\u3053\u3068\u306a\u3069<\/h4>\n<p>\u901a\u4fe1\u901f\u5ea6\u306f400kHz\u3068\u3057\u3001Arduino core \u306eWire\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7d20\u76f4\u306b\u5229\u7528\u3057\u305f\u3002INA226\u306b\u306f\u300110\u500b\u306e16\u30d3\u30c3\u30c8\u9577\u306e\u30ec\u30b8\u30b9\u30bf\u304c\u3042\u308a\u4eca\u56de\u306f\u305d\u306e\u3046\u3061\u306e7\u3064\u3092\u4f7f\u3063\u3066\u3044\u308b\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 15.6118%;\">\u30dd\u30a4\u30f3\u30bf\u30a2\u30c9\u30ec\u30b9<\/td>\n<td style=\"width: 40.5062%;\">\u540d\u79f0<br \/>\n\u30bd\u30fc\u30b9\u3067\u306e\u5b9a\u7fa9<\/td>\n<td style=\"width: 43.8819%;\">\u6a5f\u80fd\uff0f\u5099\u8003<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x00<\/td>\n<td style=\"width: 40.5062%;\">\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_CONFIG<\/td>\n<td style=\"width: 43.8819%;\">\u30c7\u30d0\u30a4\u30b9\u306e\u30ea\u30bb\u30c3\u30c8\u3001A\/D\u5909\u63db\u306e\u5bfe\u8c61\u8a2d\u5b9a\u3001A\/D\u5909\u63db\u6642\u9593\u3001\u5e73\u5747\u5316\u56de\u6570\u306a\u3069\u306e\u8a2d\u5b9a\u3002<br \/>\n<strong>\u30c8\u30ea\u30ac\u30e2\u30fc\u30c9\u3067\u306f\u3001\u3053\u306e\u30ec\u30b8\u30b9\u30bf\u3078\u306e\u66f8\u304d\u8fbc\u307f\u306b\u3088\u308a\u5909\u63db\u304c\u958b\u59cb\u3057\u3001\u540c\u6642\u306bALE\u30d4\u30f3\u304c\u975e\u30a2\u30b5\u30fc\u30c8\u72b6\u614b<\/strong>\u3068\u306a\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x01<\/td>\n<td style=\"width: 40.5062%;\">\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_SHUNT_V<\/td>\n<td style=\"width: 43.8819%;\">\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u306e\u5909\u63db\u7d50\u679c\u3092\u4fdd\u6301\u3002\u5909\u63db\u5b8c\u4e86\u6642\u306b\u8aad\u307f\u51fa\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x02<\/td>\n<td style=\"width: 40.5062%;\">\u30d0\u30b9\u96fb\u5727\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_BUS_V<\/td>\n<td style=\"width: 43.8819%;\">\u30d0\u30b9\u96fb\u5727\u306e\u5909\u63db\u7d50\u679c\u3092\u4fdd\u6301\u3002\u5909\u63db\u5b8c\u4e86\u6642\u306b\u8aad\u307f\u51fa\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x03<\/td>\n<td style=\"width: 40.5062%;\">\u96fb\u529b\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_POWER<\/td>\n<td style=\"width: 43.8819%;\">\u96fb\u529b\u306e\u8a08\u7b97\u7d50\u679c\u3092\u4fdd\u6301\u3002\u5909\u63db\u5b8c\u4e86\u6642\u306b\u8aad\u307f\u51fa\u3059\u3002<br \/>\nREG_CALIBRATION== 0\u306e\u3068\u304d\u7121\u52b9\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x04<\/td>\n<td style=\"width: 40.5062%;\">\u96fb\u6d41\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_CURRENT<\/td>\n<td style=\"width: 43.8819%;\">\u96fb\u6d41\u306e\u8a08\u7b97\u7d50\u679c\u3092\u4fdd\u6301\u3002\u5909\u63db\u5b8c\u4e86\u6642\u306b\u8aad\u307f\u51fa\u3059\u3002<br \/>\nREG_CALIBRATION== 0\u306e\u3068\u304d\u7121\u52b9\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x05<\/td>\n<td style=\"width: 40.5062%;\">\u30ad\u30e3\u30ea\u30d6\u30ec\u30fc\u30b7\u30e7\u30f3\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_CALIBRATION<\/td>\n<td style=\"width: 43.8819%;\">\u96fb\u6d41\u304a\u3088\u3073\u96fb\u529b\u3092\u7b97\u51fa\u3059\u308b\u969b\u306e\u30d5\u30eb\u30b9\u30b1\u30fc\u30eb\u3068LSB\u304b\u3089\u5c0e\u304f\u4fc2\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\n\u4eca\u56de\u306f\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u3068\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u5024\u304b\u3089\u96fb\u6d41\u3092\u6c42\u3081\u308b\u306e\u3068\u540c\u69d8\u306a2048\u3068\u3057\u305f\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 15.6118%;\">0x06<\/td>\n<td style=\"width: 40.5062%;\">\u30de\u30b9\u30af\u30a4\u30cd\u30fc\u30d6\u30eb\u30ec\u30b8\u30b9\u30bf<br \/>\nREG_MASK_ENABLE<\/td>\n<td style=\"width: 43.8819%;\">\u30a2\u30e9\u30fc\u30c8\u72b6\u614b\u306e\u8a2d\u5b9a\u6a5f\u80fd\u3068\u5909\u63db\u5b8c\u4e86\u30d5\u30e9\u30b0\u3092\u3082\u3064\u3002<br \/>\n\u4eca\u56de\u306f\u5909\u63db\u5b8c\u4e86\u6642\u306bALE\u30d4\u30f3\u304cLOW\u306b\u306a\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>INA226\u306e\u52d5\u4f5c\u8a2d\u5b9a\u306f\u3001WiFi\u7d4c\u7531\u3067\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u884c\u3046\u3088\u3046\u306b\u3057\u305f\u3002font-size\u306f\u3061\u3087\u3063\u3068\u5927\u304d\u3081\u3002<\/p>\n<figure id=\"attachment_14156\" aria-describedby=\"caption-attachment-14156\" style=\"width: 505px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/INA229_set-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-14156 size-full\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/INA229_set-1.png\" alt=\"\" width=\"505\" height=\"471\" \/><\/a><figcaption id=\"caption-attachment-14156\" class=\"wp-caption-text\">INA229 Current Monitor Settings<\/figcaption><\/figure>\n<p>\u5404\u8a2d\u5b9a\u9805\u76ee\u306e\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 27.637%; text-align: center;\"><strong>\u9805\u76ee<\/strong><\/td>\n<td style=\"width: 23.6288%; text-align: center;\"><strong>\u9078\u629e\u80a2<\/strong><\/td>\n<td style=\"width: 48.7341%; text-align: center;\"><strong>\u8aac\u660e<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.637%;\"><strong>Conversion Target<\/strong><\/td>\n<td style=\"width: 23.6288%;\">Shunt + Bus<br \/>\nShunt \u306e\u307f<br \/>\nBus \u306e\u307f<\/td>\n<td style=\"width: 48.7341%;\">\u5909\u63db\u5bfe\u8c61\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.637%;\"><strong>Sampling and Averaging<\/strong><\/td>\n<td style=\"width: 23.6288%;\">1\u56de<br \/>\n4\u56de<br \/>\n16\u56de<br \/>\n64\u56de<\/td>\n<td style=\"width: 48.7341%;\">INA226\u5185\u3067\u5e73\u5747\u3092\u5f97\u308b\u305f\u3081\u306e\u30b5\u30f3\u30d7\u30eb\u56de\u6570\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.637%;\"><strong>Conversion Time<\/strong><\/td>\n<td style=\"width: 23.6288%;\">140usec<br \/>\n204usec<br \/>\n332usec<br \/>\n588usec<br \/>\n1.1msec<\/td>\n<td style=\"width: 48.7341%;\">INA226\u306eA\/D\u5909\u63db\u6642\u9593\u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.637%;\"><strong>Use Calibration Register<\/strong><\/td>\n<td style=\"width: 23.6288%;\"><\/td>\n<td style=\"width: 48.7341%;\">\u30c1\u30a7\u30c3\u30af\u6642\u306f\u65e2\u5b9a\u306e\u30ad\u30e3\u30ea\u30d6\u30ec\u30fc\u30b7\u30e7\u30f3\u5024\u3092\u4f7f\u3046\u3002<br \/>\n\u975e\u30c1\u30a7\u30c3\u30af\u6642\u306f0\u3092\u4f7f\u3046\u3002<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.637%;\"><strong> Use origin<\/strong><\/td>\n<td style=\"width: 23.6288%;\"><\/td>\n<td style=\"width: 48.7341%;\">html\u30d5\u30a1\u30a4\u30eb\u3092PC\u306e\u30ed\u30fc\u30ab\u30eb\u30c7\u30a3\u30b9\u30af\u304b\u3089\u8aad\u3080\u3068\u304d\u3001\u30b5\u30fc\u30d0\u30fc\u306e\u30b9\u30ad\u30fc\u30e0\u3068\u30a2\u30c9\u30ec\u30b9\u3068\u3057\u3066\u4f7f\u3046\u3002<br \/>\n\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u30b9\u30b1\u30c3\u30c1\u3067\u306f\u3001<span class=\"lang:default decode:true crayon-inline\">server.enableCORS(true); <\/span>\u00a0 \u306b\u3088\u308a\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3 \u3067\u306e\u30ea\u30bd\u30fc\u30b9\u5171\u6709\u3092\u8a31\u53ef\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u5185\u5bb9\u3092http\u30ea\u30af\u30a8\u30b9\u30c8\u3067WROOM-02\u306b\u9001\u308a\u3001\u305d\u308c\u305e\u308c\u3092INA226\u306b\u8a2d\u5b9a\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>I2C\u30a2\u30c9\u30ec\u30b9\u3084\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u306e\u5024\u306f\u3001\u8907\u6570\u306eINA226\u30e2\u30b8\u30e5\u30fc\u30eb\u3092WROOM-02\u306b\u63a5\u7d9a\u3059\u308b\u5834\u5408\u3092\u8003\u616e\u3057\u3066\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u4eca\u56de\u306e\u30d7\u30ed\u30b0\u30e9\u30e0 (ina226_if) \u3067\u306f\u3001<strong>\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u3068\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u304b\u3089\u30aa\u30fc\u30e0\u306e\u6cd5\u5247\u3067\u96fb\u6d41\u3092\u6c42\u3081\u3066\u3044\u308b<\/strong>\u306e\u3067\u3001\u30ad\u30e3\u30ea\u30d6\u30ec\u30fc\u30b7\u30e7\u30f3\u30ec\u30b8\u30b9\u30bf\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082(\u50240\u3092\u30bb\u30c3\u30c8\u3057\u3066\u3082)\u96fb\u6d41\u3084\u96fb\u529b\u306e\u5024\u306f\u5909\u308f\u3089\u306a\u3044\u3002\u30ad\u30e3\u30ea\u30d6\u30ec\u30fc\u30b7\u30e7\u30f3\u30ec\u30b8\u30b9\u30bf\u306b0\u3092\u30bb\u30c3\u30c8\u3057\u305f\u3068\u304d\u3001\u5909\u63db\u6642\u9593\u304c\u77ed\u304f\u306a\u308b\u3053\u3068\u3082\u671f\u5f85\u3057\u305f\u304c\u5909\u63db\u6642\u9593\u306b\u5909\u5316\u306f\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>WROOM-02\u306eFS\u9818\u57df\u306bhtml\u30d5\u30a1\u30a4\u30eb\u3092\u683c\u7d0d\u3057\u3066\u305d\u3053\u304b\u3089\u8aad\u307f\u51fa\u3059\u3068\u304d\u306b\u306f\u30aa\u30ea\u30b8\u30f3\u6307\u5b9a\u306f\u4e0d\u8981\u3060\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3059\u3050\u306b\u76f4\u3057\u305f\u304f\u306a\u308b\u304b\u3089\u3001PC\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u5229\u7528\u3067\u304d\u308b\u65b9\u304c\u4fbf\u5229\u3060\u308d\u3046\u3002<\/p>\n<h4>\u5909\u63db\u6642\u9593\u306a\u3069<\/h4>\n<p>INA226\u3067\u306f\u3001\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u3068\u30d0\u30b9\u96fb\u5727<strong>\u305d\u308c\u305e\u308c\u306eA\/D\u5909\u63db\u6642\u9593\u30928\u901a\u308a\u306b\u8a2d\u5b9a\u3067\u304d\u308b<\/strong>\u3002\u4eca\u56de\u306e\u5b9f\u88c5\u3067\u306f\u3044\u305a\u308c\u3082\u540c\u3058\u5024\u306b\u306a\u308b\u3088\u3046\u306b\u30575\u7a2e\u985e\u304b\u3089\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3002\u96fb\u6e90\u96fb\u5727\u304c\u5b89\u5b9a\u3057\u3066\u3044\u308b\u5bfe\u8c61\u3092\u76f8\u624b\u306b\u3059\u308b\u306a\u3089\u3070\u3001\u30d0\u30b9\u96fb\u5727\u3060\u3051\u9ad8\u901f\u306b\u3057\u3066\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u306f\u3086\u3063\u304f\u308a\u76ee\u306b\u3057\u3066\u3084\u308b\u3053\u3068\u3082\u306a\u3069\u3082\u53ef\u80fd\u3067\u3001\u305d\u306e\u3042\u305f\u308a\u306f\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u306e\u8a2d\u5b9a\u6b21\u7b2c\u3068\u306a\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u8907\u6570\u306e\u5909\u63db\u7d50\u679c\u3092\u53d6\u5f97\u3057\u3066\u5e73\u5747\u5024\u3092\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf\u306b\u683c\u7d0d\u3059\u308b\u6a5f\u80fd\u3082\u3042\u308a\u3001\u3053\u3061\u3089\u30828\u901a\u308a\u306e\u30b5\u30f3\u30d7\u30eb\u56de\u6570\u304c\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002\u4eca\u56de\u306e\u5b9f\u88c5\u3067\u306f4\u7a2e\u985e(1, 4, 16, 64\u30b5\u30f3\u30d7\u30eb)\u304b\u3089\u9078\u629e\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3002<\/p>\n<p>\u6642\u9593\u304c\u95a2\u4fc2\u3059\u308b\u8981\u7d20\u304c\u8907\u6570\u3042\u308b\u306e\u3067\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u306b\u66f8\u304d\u8fbc\u3093\u3067\u5909\u63db\u958b\u59cb\u3092\u6307\u793a\u3057\u3066\u304b\u3089\u3001\u30c7\u30fc\u30bf\u304c\u7528\u610f\u3055\u308c\u308b\u307e\u3067\u306e<strong>\u5909\u63db\u5b8c\u4e86\u6642\u9593<\/strong>\u3092\u6e2c\u3063\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u5909\u63db\u5bfe\u8c61\u3054\u3068\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<table style=\"width: 100%;\">\n<tbody>\n<tr>\n<td style=\"text-align: center; width: 21.3079%;\"><strong>A\/D\u5909\u63db\u6642\u9593<\/strong><\/td>\n<td style=\"text-align: center; width: 18.5655%;\"><strong>\u5e73\u5747\u5316\u56de\u6570<\/strong><\/td>\n<td style=\"text-align: center; width: 17.2996%;\"><strong>Shunt and Bus<\/strong><\/td>\n<td style=\"text-align: center; width: 25.5274%;\"><strong>Shunt\u306e\u307f<\/strong><\/td>\n<td style=\"text-align: center; width: 17.0886%;\"><strong>Bus\u306e\u307f<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\">140us<\/td>\n<td style=\"width: 18.5655%;\">1<\/td>\n<td style=\"width: 17.2996%;\">360us<\/td>\n<td style=\"width: 25.5274%;\">238us<\/td>\n<td style=\"width: 17.0886%;\">197us<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">4<\/td>\n<td style=\"width: 17.2996%;\">1.22ms<\/td>\n<td style=\"width: 25.5274%;\">665us<\/td>\n<td style=\"width: 17.0886%;\">624us<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">16<\/td>\n<td style=\"width: 17.2996%;\">4.63ms<\/td>\n<td style=\"width: 25.5274%;\">2.37ms<\/td>\n<td style=\"width: 17.0886%;\">2.33ms<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">64<\/td>\n<td style=\"width: 17.2996%;\">18.3ms<\/td>\n<td style=\"width: 25.5274%;\">9.20ms<\/td>\n<td style=\"width: 17.0886%;\">9.16ms<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\">204us<\/td>\n<td style=\"width: 18.5655%;\">1<\/td>\n<td style=\"width: 17.2996%;\">490us<\/td>\n<td style=\"width: 25.5274%;\">303us<\/td>\n<td style=\"width: 17.0886%;\">262us<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">4<\/td>\n<td style=\"width: 17.2996%;\">1.72ms<\/td>\n<td style=\"width: 25.5274%;\">925us<\/td>\n<td style=\"width: 17.0886%;\">884us<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">16<\/td>\n<td style=\"width: 17.2996%;\">6.71ms<\/td>\n<td style=\"width: 25.5274%;\">3.41ms<\/td>\n<td style=\"width: 17.0886%;\">3.37ms<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">64<\/td>\n<td style=\"width: 17.2996%;\">26.64ms<\/td>\n<td style=\"width: 25.5274%;\">13.4ms<\/td>\n<td style=\"width: 17.0886%;\">13.3ms<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\">332us<\/td>\n<td style=\"width: 18.5655%;\">1<\/td>\n<td style=\"width: 17.2996%;\">750us<\/td>\n<td style=\"width: 25.5274%;\">433us<\/td>\n<td style=\"width: 17.0886%;\">392us<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\"><\/td>\n<td style=\"width: 18.5655%;\">4<\/td>\n<td style=\"width: 17.2996%;\">2.77ms<\/td>\n<td style=\"width: 25.5274%;\">1.45ms<\/td>\n<td style=\"width: 17.0886%;\">1.40ms<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\">588us<\/td>\n<td style=\"width: 18.5655%;\">1<\/td>\n<td style=\"width: 17.2996%;\">1.27ms<\/td>\n<td style=\"width: 25.5274%;\">694us<\/td>\n<td style=\"width: 17.0886%;\">652us<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 21.3079%;\">1.1ms<\/td>\n<td style=\"width: 18.5655%;\">1<\/td>\n<td style=\"width: 17.2996%;\">2.31ms<\/td>\n<td style=\"width: 25.5274%;\">1.21ms<\/td>\n<td style=\"width: 17.0886%;\">1.17ms<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5e73\u5747\u5316\u56de\u6570\u3092\u5897\u3084\u3057\u305f\u3068\u304d\u306e\u5909\u63db\u5b8c\u4e86\u6642\u9593\u306f\u30011\u56de\u3060\u3051\u306e\u3068\u304d\u306e\u56de\u6570\u500d\u3088\u308a\u306f\u77ed\u3044\u3082\u306e\u306e\u3001\u76ee\u5b89\u3068\u3057\u3066\u306f\u56de\u6570\u500d\u3068\u8003\u3048\u3066\u826f\u3055\u305d\u3046\u3060\u3063\u305f\u3002<\/p>\n<p>\u30c8\u30ea\u30ac\u30e2\u30fc\u30c9\u3067\u306f\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u3078\u306e\u66f8\u8fbc\u307f\u3067ALE\u30d4\u30f3\u304c\u975e\u30a2\u30b5\u30fc\u30c8\u72b6\u614b(\u4eca\u56de\u306e\u8a2d\u5b9a\u3067\u306fHIGH)\u3068\u306a\u308a\u3001\u5909\u63db\uff0f\u8a08\u7b97\u7d50\u679c\u304c\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf\u304b\u3089\u8aad\u51fa\u3057\u53ef\u80fd\u3068\u306a\u3063\u305f\u6642\u70b9(\u5909\u63db\u5b8c\u4e86\u6642\u70b9)\u3067\u30a2\u30b5\u30fc\u30c8\u72b6\u614b(LOW)\u3068\u306a\u308b\u3002\u3053\u308c\u3092\u30ed\u30b8\u30a2\u30ca\u3067\u89b3\u6e2c\u3057\u3066<strong>ALE\u30d4\u30f3\u304cHIGH\u306e\u671f\u9593\u306e\u6642\u9593<\/strong>\u3092\u5909\u63db\u5b8c\u4e86\u6642\u9593\u3068\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u307e\u305f\u3001\u5909\u63db\u5b8c\u4e86\u6642(ALE\u30d4\u30f3=LOW)\u306b\u306a\u3063\u305f\u6642\u70b9\u30674\u3064\u306e\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf(\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u3001\u30d0\u30b9\u96fb\u5727\u3001\u96fb\u6d41\u3001\u96fb\u529b)\u3092\u8aad\u307f\u51fa\u3059\u3068\u304d\u306e\u69d8\u5b50\u3092\u30ed\u30b8\u30a2\u30ca\u3067\u898b\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<figure id=\"attachment_14128\" aria-describedby=\"caption-attachment-14128\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/INA229-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-14128 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/INA229-2-552x177.png\" alt=\"\" width=\"552\" height=\"177\" \/><\/a><figcaption id=\"caption-attachment-14128\" class=\"wp-caption-text\">INA229 data read<\/figcaption><\/figure>\n<p>\u8aad\u51fa\u3057\u306e\u958b\u59cb\u304b\u3089\u7d42\u4e86\u307e\u3067\u306b\u7d04590\u03bcsec\u304b\u304b\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>\u3064\u3044\u3067\u306b\u66f8\u3044\u3066\u304a\u304f\u3068\u3001\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u3078\u306e\u66f8\u8fbc\u307f\u306b\u306f\u7d04125\u03bcsec \u304b\u304b\u308b\u306e\u3067\u3001\u30de\u30a4\u30b3\u30f3\u5074\u304b\u3089\u898b\u305f\u30c8\u30fc\u30bf\u30eb\u306e\u5909\u63db\u6642\u9593\u306f\u3001<strong>125 + (INA226\u306e\u5909\u63db\u5b8c\u4e86\u6642\u9593) + 590 (\u03bcsec)<\/strong> \u306b\u306a\u308b\u3060\u308d\u3046\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30b7\u30e3\u30f3\u30c8\u96fb\u5727\u3068\u30d0\u30b9\u96fb\u5727\u3092<strong>\u6700\u901f\u3067\u53d6\u5f97\u3059\u308b\u306e\u306b\u8981\u3059\u308b\u6642\u9593\u306f 125 + 360 + 590\u00a0 = 1.1msec<\/strong>\u00a0 \u306b\u306a\u308b\u3002<\/p>\n<p>\u96fb\u6d41\u3068\u96fb\u529b\u306e\u8ee2\u9001\u3092\u3084\u3081\u305f\u5834\u5408\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u51fa\u3059\u305f\u3081\u306e\u6642\u9593\u306f300\u03bcsec\u307b\u3069\u306b\u306a\u308b\u304b\u3089\u3001\u5909\u63db\u7d50\u679c\u3092\u30de\u30a4\u30b3\u30f3\u306e\u30e1\u30e2\u30ea\u306b\u683c\u7d0d\u3057\u3066\u3044\u304f\u524d\u63d0\u306a\u3089\u30701\u79d2\u9593\u306b1000\u30b5\u30f3\u30d7\u30eb\u4ee5\u4e0a\u53d6\u5f97\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u308b\u3060\u308d\u3046\u3002<\/p>\n<h4>I2C\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9<\/h4>\n<p>16\u30d3\u30c3\u30c8\u9577\u30ec\u30b8\u30b9\u30bf\u306e\u66f8\u8fbc\u307f\u3068\u8aad\u51fa\u3057\u306f\u3001\u4e0a\u4f4d\u30d0\u30a4\u30c8\u3001\u4e0b\u4f4d\u30d0\u30a4\u30c8\u306e\u9806\u306b\u884c\u3046\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u7528\u610f\u3057\u305f\u3002<\/p>\n<pre class=\"toolbar:1 nums:true lang:default decode:true\" title=\"register write and read\">uint8_t ina226_if::i2c_write_reg16(uint8_t pointer, uint16_t data) {\r\n  uint8_t buf[4];\r\n  buf[0] = (uint8_t)(data &gt;&gt; 8) ;\r\n  buf[1] = (uint8_t)(data &amp; 0xff);\r\n  Wire.beginTransmission(i2c_address);\r\n  Wire.write(pointer);\r\n  Wire.write(buf, 2);\r\n  i2c_status =  Wire.endTransmission();\r\n  return i2c_status;\r\n}\r\n\r\nuint16_t ina226_if::i2c_read_reg16(uint8_t pointer) {\r\n  Wire.beginTransmission(i2c_address);\r\n  Wire.write(pointer);\r\n  i2c_status = Wire.endTransmission();\r\n  Wire.requestFrom(i2c_address, (uint8_t)2);\r\n  uint16_t msb = (uint16_t)(Wire.read() &lt;&lt; 8);\r\n  uint16_t lsb = (uint16_t)Wire.read();\r\n  return msb | lsb;\r\n}\r\n<\/pre>\n<p>I2C\u5bfe\u5fdc\u306eRTC(DS3231\u3068\u304b)\u306a\u3069\u3067\u306f\u30018\u30d3\u30c3\u30c8\u30ec\u30b8\u30b9\u30bf\u3092\u9023\u7d9a\u3057\u3066\u8aad\u307f\u66f8\u304d\u3059\u308b\u3068\u304d\u30c7\u30d0\u30a4\u30b9\u5074\u3067\u30dd\u30a4\u30f3\u30bf\u30a2\u30c9\u30ec\u30b9\u3092\u6697\u9ed9\u3067\u30a4\u30f3\u30af\u30ea\u30e1\u30f3\u30c8\u3057\u3066\u304f\u308c\u305f\u308a\u3059\u308b\u304c\u3001INA226\u3067\u306f\u6bce\u5ea6\u6bce\u5ea6\u30dd\u30a4\u30f3\u30bf\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h3>\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1 ESP_INA226_httpd.ino<\/h3>\n<p>\u30e1\u30a4\u30f3\u30b9\u30b1\u30c3\u30c1\u306f\u3001<strong>ESP8266 Arduino Core<\/strong> \u306b\u542b\u307e\u308c\u3066\u3044\u308b <em>ESP8266WebServer<\/em> \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001WiFi\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e2\u30fc\u30c9\u3067WiFi \u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002\u4ee5\u4e0b\u306eAPI \u3092\u7528\u610f\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true\">  server.on(\"\/get_trig\", onGetTrig);  \/\/ Trigger mode.\r\n  server.on(\"\/get_cont\", onGetCont);  \/\/ Coninuous mode.\r\n  server.on(\"\/getsettings\", onGetSettings);\r\n  server.on(\"\/setsettings\", onSetSettings);\r\n  server.onNotFound([](){\r\n    if(!onFileRead(server.uri())) {\r\n      server.send(404, \"text\/plain\", \"FileNotFound\");\r\n    }\r\n  });\r\n<\/pre>\n<h5>\/get_trig<\/h5>\n<p>\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u3078\u306e\u66f8\u8fbc\u307f\u3067\u5909\u63db\u3092\u958b\u59cb\u3057\u3001ALE\u30d4\u30f3\u304cLOW\u306b\u306a\u3063\u305f\u6642\u70b9\u3067\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf\u304b\u3089\u306e\u53d6\u5f97\u3092\u884c\u3063\u3066\u30c7\u30fc\u30bf\u3092CSV\u5f62\u5f0f\u3067\u5fdc\u7b54\u3059\u308b\u3002\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u306b\u66f8\u304d\u8fbc\u3080\u5024\u306f\u3001\u30b9\u30b1\u30c3\u30c1\u5185\u306b\u7528\u610f\u3057\u305f\u521d\u671f\u5024\u3001\u3042\u308b\u3044\u306f\u3001<strong> \/setsettings<\/strong> \u306b\u3088\u3063\u3066\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u53d7\u3051\u53d6\u3063\u305f\u3082\u306e\u3092\u4f7f\u3046\u3002<\/p>\n<h5>\/get_cont<\/h5>\n<p>\u9023\u7d9a\u30e2\u30fc\u30c9\u3067\u306e\u30c7\u30fc\u30bf\u53d6\u5f97\u3092\u884c\u3046\u3002\u521d\u56de\u306e\u307f\u30b3\u30f3\u30d5\u30a3\u30b0\u30ec\u30b8\u30b9\u30bf\u3092\u9023\u7d9a\u30e2\u30fc\u30c9\u306b\u8a2d\u5b9a\u3057\u3066\u66f8\u8fbc\u307f\u3092\u884c\u3044\u3001\u3042\u3068\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fdc\u3058\u3066\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf\u304b\u3089\u306e\u8aad\u51fa\u3057\u3068\u30c7\u30fc\u30bf\u306e\u5fdc\u7b54\u3092\u884c\u3046\u3002<\/p>\n<p>\u5fdc\u7b54\u3059\u308b\u30c7\u30fc\u30bf\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6587\u5b57\u5217\u5316\u3057\u305f\u6d6e\u52d5\u5c0f\u6570\u70b9\u30c7\u30fc\u30bf\u3092\u9023\u306d\u305fCSV\u5f62\u5f0f\u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default decode:true \">String csv_values() {\r\n  String s = String(ina226.get_current_mA());\r\n  s += \",\" + String(ina226.get_shunt_voltage());\r\n  s += \",\" + String(ina226.get_bus_voltage());\r\n  s += \",\" + String(ina226.get_power_mw());\r\n  return s;  \r\n}\r\n<\/pre>\n<p>\u5148\u306b\u66f8\u3044\u305f\u3088\u3046\u306b\u3001\u5909\u63db\u5bfe\u8c61\u3001\u5909\u63db\u6642\u9593\u3001\u5e73\u5747\u5316\u56de\u6570\u3092\u30bb\u30c3\u30c8\u3057\u305f\u6642\u70b9\u3067\u30c7\u30fc\u30bf\u30ec\u30b8\u30b9\u30bf\u304b\u3089\u65b0\u898f\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308b\u307e\u3067\u306e\u6642\u9593\u306f\u308f\u304b\u308b\u306e\u3067\u3001\u305d\u306e\u6642\u9593\u4ee5\u4e0a\u306e\u30a4\u30f3\u30bf\u30fc\u30d0\u30eb\u3067\u30dd\u30fc\u30ea\u30f3\u30b0\u3057\u3066\u3084\u308b\u306a\u3089\u3070\u3001\u9023\u7d9a\u30e2\u30fc\u30c9\u3067\u3082\u30c8\u30ea\u30ac\u30e2\u30fc\u30c9\u3067\u3082\u5927\u3057\u3066\u5909\u308f\u3089\u306a\u3044\u3002<\/p>\n<h5>\/getsettings<\/h5>\n<p>\u30b5\u30fc\u30d0\u30fc\u5074\u304c\u3082\u3064INA226\u306e\u8a2d\u5b9a\u5024\u3092CSV\u5f62\u5f0f\u3067\u5fdc\u7b54\u3059\u308b\u3002\u4f8b\u3048\u3070\u30d6\u30e9\u30a6\u30b6\u3092\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5\u3057\u305f\u3088\u3046\u306a\u3068\u304d\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u8a2d\u5b9a\u5024\u3092\u30d6\u30e9\u30a6\u30b6\u5074(\u30b9\u30af\u30ea\u30d7\u30c8) \u306b\u6559\u3048\u308b\u305f\u3081\u306b\u7528\u3044\u3066\u3044\u308b\u3002<\/p>\n<h5>\/setsettings<\/h5>\n<p>\u30d6\u30e9\u30a6\u30b6\u5074\u306e\u8a2d\u5b9a\u5185\u5bb9\u3092\u30b5\u30fc\u30d0\u30fc\u5074\u306b\u901a\u77e5\u3059\u308b\u3002<\/p>\n<h5>server.onNotFound<\/h5>\n<p>\u4e0a\u8a184\u3064\u4ee5\u5916\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u304d\u305f\u3089\u3001onNotFound() \u30cf\u30f3\u30c9\u30e9\u304c\u547c\u3070\u308c\u308b\u3002\u30d1\u30b9\u8981\u7d20\u304cFS\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u4e00\u81f4\u3059\u308c\u3070FS\u304b\u3089\u8aad\u307f\u3060\u3057\u305f\u5185\u5bb9\u3092\u5fdc\u7b54\u3059\u308b\u3057\u3001\u306a\u3051\u308c\u3070\u30b9\u30c6\u30fc\u30bf\u30b9404\u3092\u5fdc\u7b54\u3059\u308b\u3002<\/p>\n<h3>\u30d6\u30e9\u30a6\u30b6\u7528\u306eHTML\u30d5\u30a1\u30a4\u30eb (index.html)<\/h3>\n<p>\u30b5\u30fc\u30d0\u30fc\u30a2\u30c9\u30ec\u30b9\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u304c\u958b\u304f\u3002<\/p>\n<figure id=\"attachment_14191\" aria-describedby=\"caption-attachment-14191\" style=\"width: 454px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/66c19942ab4ba346fdb64ccc04cde373-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-14191 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/66c19942ab4ba346fdb64ccc04cde373-3-454x552.png\" alt=\"\" width=\"454\" height=\"552\" \/><\/a><figcaption id=\"caption-attachment-14191\" class=\"wp-caption-text\">INA226 index.html<\/figcaption><\/figure>\n<p>Polling Interval \u306e\u6a2a\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u6307\u5b9a\u3057\u305f msec\u3054\u3068\u306b\u30b5\u30fc\u30d0\u30fc\u306b\u5bfe\u3057\u3066\u30c8\u30ea\u30ac\u30e2\u30fc\u30c9 (\/get_trig) \u307e\u305f\u306f\u9023\u7d9a\u30e2\u30fc\u30c9(\/get_cont) \u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51fa\u3057\u3001\u53d6\u5f97\u3057\u305f\u6570\u5024\u3067\u8868\u793a\u3092\u66f4\u65b0\u3059\u308b\u3002<\/p>\n<p>Settings \u30dc\u30bf\u30f3\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u524d\u306b\u793a\u3057\u305f\u8a2d\u5b9a\u753b\u9762\u3092\u8868\u793a\u3059\u308b\u3002\u305d\u306e\u6a2a\u306e\u8d64\u3044\u70b9\u3005\u306f\u3001\u52d5\u4f5c\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u793a\u3059\u305f\u3081\u306e\u3082\u306e\u3067\u3001\u30dd\u30fc\u30ea\u30f3\u30b0\u3054\u3068\u306b1\u70b9\u305a\u3064\u5897\u3048\u3066\u3044\u304f\u3002<\/p>\n<p>\u4e0b\u5074\u306e\u77e9\u5f62\u9818\u57df\u306f\u3001\u53d6\u5f97\u3057\u305f\u5024\u3092\u30b0\u30e9\u30d5\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u9818\u57df\u3067\u30013\u3064\u306e\u30dc\u30bf\u30f3\u3067\u30ed\u30b0\u306e\u958b\u59cb\u3001\u30b0\u30e9\u30d5\u8868\u793a\u3001\u30ed\u30b0\u304a\u3088\u3073\u30b0\u30e9\u30d5\u6d88\u53bb\u3092\u884c\u3046\u3002<\/p>\n<p>\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001data\/index.html \u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u53c2\u7167\u306e\u3053\u3068\u3002<\/p>\n<h4>index.html\u306fFS\u9818\u57df\u306b\u683c\u7d0d<\/h4>\n<p>index.html\u30d5\u30a1\u30a4\u30eb\u306f\u3001\u57fa\u672c\u7684\u306b\u306fWROOM-02\u306e\u30d5\u30e9\u30c3\u30b7\u30e5\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0(FFS)\u5185\u306b\u683c\u7d0d\u3059\u308b\u3002Arduino IDE\u306e\u30c4\u30fc\u30eb\u30e1\u30cb\u30e5\u30fc\u306e <em><strong>ESP8266 LittleFS Data Upload<\/strong><\/em> \u3092\u9078\u629e\u3059\u308b\u3053\u3068\u3067\u3001\u30b9\u30b1\u30c3\u30c1\u306e\u3042\u308b\u30d5\u30a9\u30eb\u30c0\u306b\u4f5c\u3063\u305f data \u30d5\u30a9\u30eb\u30c0\u306e\u5185\u5bb9\u304cFFS\u306b\u8ee2\u9001\u3055\u308c\u308b\u3002<\/p>\n<figure id=\"attachment_14153\" aria-describedby=\"caption-attachment-14153\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/0d40a5e4a645fc6b96e767d64ac0878e-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"waku wp-image-14153 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/0d40a5e4a645fc6b96e767d64ac0878e-1-552x274.png\" alt=\"\" width=\"552\" height=\"274\" \/><\/a><figcaption id=\"caption-attachment-14153\" class=\"wp-caption-text\">Arduino IDE<\/figcaption><\/figure>\n<p>\u8ee2\u9001\u306f\u30b7\u30ea\u30a2\u30eb\u3067\u3082OTA\u3067\u3082\u53ef\u80fd\u3060\u304c\u3001\u30b7\u30ea\u30a2\u30eb\u8ee2\u9001\u306e\u65b9\u304c\u4f55\u3092\u3084\u3063\u3066\u3044\u308b\u306e\u304b\u308f\u304b\u308a\u3084\u3059\u3044\u6c17\u304c\u3059\u308b\u3002<\/p>\n<p>\u524d\u306b\u3082\u66f8\u3044\u305f\u3088\u3046\u306b\u3001FFS\u306b\u8ee2\u9001\u305b\u305a\u306bPC\u306b\u304a\u3044\u305f index.html \u3092\u30d6\u30e9\u30a6\u30b6\u306b\u8aad\u307f\u8fbc\u3093\u3067\u4f7f\u3063\u305f\u3082\u304b\u307e\u308f\u306a\u3044\u3002<\/p>\n<h4>\u30d6\u30e9\u30a6\u30b6\u3067\u4f7f\u3063\u3066\u3044\u308b\u3068\u3053\u308d<\/h4>\n<p>\u7279\u306b\u4f7f\u3044\u65b9\u3068\u3044\u3046\u306e\u3082\u306a\u3044\u306e\u3067\u3001PC\u306eChrome\u3068\u30b9\u30de\u30db\u306eChrome\u3067\u30e2\u30cb\u30bf\u8868\u793a\u3057\u3066\u3044\u308b\u3068\u3053\u308d\u3092YouTube\u306b\u52d5\u753b\u3092\u767b\u9332\u3057\u305f\u3002<\/p>\n<p><iframe loading=\"lazy\" title=\"INA226 + ESP-WROOM-02 \u96fb\u6d41\u30e2\u30cb\u30bf (PC\u306e\u30d6\u30e9\u30a6\u30b6)\" width=\"672\" height=\"378\" src=\"https:\/\/www.youtube.com\/embed\/T-tXew_u4oU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h4><\/h4>\n<p><iframe loading=\"lazy\" title=\"INA226 + ESP-WROOM-02 \u96fb\u6d41\u30e2\u30cb\u30bf (\u30b9\u30de\u30db\u306e\u30d6\u30e9\u30a6\u30b6)\" width=\"672\" height=\"378\" src=\"https:\/\/www.youtube.com\/embed\/ZEvE35LU-24?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<h3>\u30b0\u30e9\u30d5<\/h3>\n<figure id=\"attachment_14192\" aria-describedby=\"caption-attachment-14192\" style=\"width: 552px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/66c19942ab4ba346fdb64ccc04cde373-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14192 size-large\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2022\/01\/66c19942ab4ba346fdb64ccc04cde373-4-552x312.png\" alt=\"\" width=\"552\" height=\"312\" \/><\/a><figcaption id=\"caption-attachment-14192\" class=\"wp-caption-text\">INA229 Current Monitor<\/figcaption><\/figure>\n<p>\u30b0\u30e9\u30d5\u90e8\u5206\u3092\u5207\u308a\u51fa\u3057\u305f\u3082\u306e\u3002<\/p>\n<p>\u3053\u308c\u306f Seeeduino XIAO-m0 \u306e3\u3064\u306e\u30aa\u30f3\u30dc\u30fc\u30c9LED\u30921\u3064\u305a\u3064\u70b9\u706f\u3055\u305b\u3066\u306f\u6d88\u706f\u3055\u305b\u3066\u3044\u308b\u3068\u304d\u3001USB\u30b1\u30fc\u30d6\u30eb\u306eVBUS\u3092\u6d41\u308c\u308b\u96fb\u6d41\u3068\u96fb\u5727\u3092\u30e2\u30cb\u30bf\u3057\u305f\u3082\u306e\u3067\u30012\u3064\u8f09\u3063\u3066\u3044\u308b\u9752\u8272LED\u3092\u70b9\u706f\u3055\u305b\u305f\u3068\u304d\u306e\u65b9\u304c\u3001\u6a59\u8272LED\u3088\u308a\u500b\u3005\u306e\u6d88\u8cbb\u96fb\u6d41\u304c\u5c11\u306a\u3044\u306a\u3093\u3066\u3053\u3068\u304c\u5206\u304b\u308b\u3002\u9752\u8272\u306f1\u500b\u3042\u305f\u308a0.75mA\u7a0b\u5ea6\u3067\u3001\u6a59\u8272\u306e\u65b9\u306f1\u500b\u3042\u305f\u308a1.3mA\u7a0b\u5ea6\u3002<\/p>\n<p>USB\u30b1\u30fc\u30d6\u30eb\u306eVBUS\u96fb\u6d41\u3092\u30e2\u30cb\u30bf\u3059\u308b\u305f\u3081\u306b\u3001\u6700\u521d\u306e\u5199\u771f\u306e\u3088\u3046\u306aVBUS\u3092\u5f15\u304d\u51fa\u3057\u305f\u30b1\u30fc\u30d6\u30eb\uff1f\u3092\u4f5c\u6210\u3057\u3066\u4f7f\u3063\u305f\u3002<\/p>\n<h1>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h1>\n<ul style=\"list-style-type: circle;\">\n<li>INA226\u3092\u4f7f\u3063\u305f\u96fb\u6d41\u30e2\u30cb\u30bf\u3092\u4f5c\u308b\u524d\u306b\u3001\u540c\u3058TI\u793e\u306eINA219\u3082\u4f7f\u3063\u3066\u3044\u305f\u3002INA226\u3068\u6bd4\u3079\u308b\u3068\u3001\u5206\u89e3\u80fd\u304c\u4f4e\u3044(ADC\u306f12\u30d3\u30c3\u30c8)\u3001ALE\u30d4\u30f3\u304c\u306a\u3044\u3001\u30aa\u30d5\u30bb\u30c3\u30c8\u96fb\u5727\u304c\u5927\u304d\u3044(\u8aa4\u5dee\u304c\u5927\u304d\u3044)\u3068\u3044\u3063\u305f\u30c7\u30e1\u30ea\u30c3\u30c8\u3082\u3042\u308b\u304c\u3001PGA(Pre Gain Amp)\u3092\u5185\u8535\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u5e83\u3044\u30d5\u30eb\u30b9\u30b1\u30fc\u30eb\u30ec\u30f3\u30b8\u3092\u9078\u629e\u3067\u304d\u308b\u304b\u3089\u3001Raspberry Pi\u00a0 (Model4B) \u306e\u3088\u3046\u306a\u6d88\u8cbb\u96fb\u6d41\u306e\u5927\u304d\u306a\u76f8\u624b\u306b\u3082\u30b7\u30e3\u30f3\u30c8\u62b5\u6297\u3092\u5909\u3048\u308b\u3053\u3068\u306a\u304f\u4f7f\u3048\u308b\u306e\u304c\u5229\u70b9\u3060\u308d\u3046\u3002<\/li>\n<li>hoboNicola\u30a2\u30c0\u30d7\u30bf\u306b\u4f7f\u3046\u5404\u7a2e\u30de\u30a4\u30b3\u30f3\u306e\u3001\u5b9a\u5e38\u6642\u3084\u30b9\u30ea\u30fc\u30d7\u6642\u306e\u96fb\u6d41\u6e2c\u5b9a\u306b\u4f7f\u3046\u4e88\u5b9a\u3002<\/li>\n<li>\u306a\u306b\u304b\u809d\u5fc3\u306a\u3053\u3068\u3092\u66f8\u3044\u3066\u3044\u306a\u3044\u3088\u3046\u306a\u6c17\u3082\u3059\u308b\u306e\u3067\u3001\u6c17\u304c\u3064\u3044\u305f\u3089\u8ffd\u8a18\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>WROOM-02 + INA226 WiFi\u96fb\u6d41\u30e2\u30cb\u30bf \u96fb\u6d41\uff0f\u96fb\u5727\u30e2\u30cb\u30bf\u30c7\u30d0\u30a4\u30b9\u306eINA226\u3068\u3001WiFi\u304c\u7c21\u5358\u306b\u4f7f\u3048\u308bESP-WROOM-02\u3092\u4f7f\u3063\u3066\u3001\u96fb\u6d41\uff0f\u96fb\u5727\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3092WEB\u30d6\u30e9\u30a6\u30b6\u3067\u884c\u3046\u3002 \u30d6\u30e9\u30a6\u30b6\u3067\u306f\u3001\u96fb &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=13437\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">ESP-WROOM-02\u3068INA226\u3067WiFi\u96fb\u6d41\u30e2\u30cb\u30bf<\/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":[8,69],"tags":[65,176,199,200],"class_list":["post-13437","post","type-post","status-publish","format-standard","hentry","category-pc","category-programming","tag-arduino","tag-ina226","tag-wroom-02","tag-200"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13437","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=13437"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/13437\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}