{"id":2197,"date":"2021-05-19T10:24:38","date_gmt":"2021-05-19T01:24:38","guid":{"rendered":"https:\/\/www.amano-labo.jp\/pages\/?p=2197"},"modified":"2021-05-20T10:37:46","modified_gmt":"2021-05-20T01:37:46","slug":"co2-%e6%b9%bf%e5%ba%a6-%e6%b8%a9%e5%ba%a6%e8%a8%88%e6%b8%ac%e3%82%a8%e3%83%83%e3%82%b8%e3%83%87%e3%83%90%e3%82%a4%e3%82%b9%e3%81%ae%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/www.amano-labo.jp\/pages\/tips\/2197\/","title":{"rendered":"CO2\/\u6e7f\u5ea6\/\u6e29\u5ea6\u8a08\u6e2c\u30a8\u30c3\u30b8\u30c7\u30d0\u30a4\u30b9\u306e\u4f5c\u6210"},"content":{"rendered":"<div class=\"amano- amano-entity-placement\" id=\"amano-1390071107\"><div id=\"amano-1616002782\"><a href=\"https:\/\/www.amano-labo.jp\/pages\/blog\/1941\/\" aria-label=\"amls2\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2.png\" alt=\"\"  srcset=\"https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2.png 1000w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-300x24.png 300w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-768x61.png 768w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-100x8.png 100w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-150x12.png 150w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-200x16.png 200w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-450x36.png 450w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-600x48.png 600w, https:\/\/www.amano-labo.jp\/pages\/wp-content\/uploads\/2020\/09\/amls2-900x72.png 900w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" width=\"1000\" height=\"80\"   \/><\/a><\/div><\/div>\n<p class=\"wp-block-paragraph\">\u65b0\u578b\u30b3\u30ed\u30ca\u30a6\u30a4\u30eb\u30b9\u611f\u67d3\u62e1\u5927\u9632\u6b62\u306e\u89b3\u70b9\u3068\u7d50\u9732\u9632\u6b62\u306e\u89b3\u70b9\u304b\u3089\u7814\u7a76\u5ba4\u3067CO2\u3068\u6e7f\u5ea6\u30fb\u6e29\u5ea6\u3092\u8a08\u6e2c\u3059\u308b\u30a8\u30c3\u30b8\u30c7\u30d0\u30a4\u30b9\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3082\u3068\u3082\u3068\u7814\u7a76\u5ba4\u306f\u88cf\u5c71\u306e\u5f71\u97ff\u3067\u590f\u671f\u306b\u6e7f\u5ea6\u304c\u9ad8\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u9664\u6e7f\u6a5f\u306e\u904b\u7528\u304c\u4e0d\u53ef\u6b20\u3067\u3059\u3002\u3053\u308c\u3092\u5165\u308c\u5fd8\u308c\u3066\u3057\u307e\u3046\u3068\u6700\u60aa\u3001\u7d50\u9732\u306b\u3088\u308b\u6a5f\u5668\u306e\u7834\u640d\u304c\u5371\u60e7\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u305f\u3081\u3001\u4ee5\u524d\u3088\u308a\u6e29\u5ea6\u30fb\u6e7f\u5ea6\u3092\u8a08\u6e2c\u3059\u308b\u30a8\u30c3\u30b8\u30c7\u30d0\u30a4\u30b9\u3092\u4f5c\u3063\u3066\u8a2d\u7f6e\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u3001\u66f4\u306bCO2\u30bb\u30f3\u30b5\u30fc\u3092\u8ffd\u52a0\u3057\u3001\u63db\u6c17\u72b6\u6cc1\u3082\u78ba\u8a8d\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.amano-labo.jp\/pages\/tips\/2197\/#%E6%A9%9F%E5%99%A8%E6%A7%8B%E6%88%90\" >\u6a5f\u5668\u69cb\u6210<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.amano-labo.jp\/pages\/tips\/2197\/#%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2\" >\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.amano-labo.jp\/pages\/tips\/2197\/#%E5%8F%97%E4%BF%A1%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2%EF%BC%88Gdrive_Google_Apps_Script%EF%BC%89\" >\u53d7\u4fe1\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\uff08Gdrive \/ Google Apps Script\uff09<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%A9%9F%E5%99%A8%E6%A7%8B%E6%88%90\"><\/span>\u6a5f\u5668\u69cb\u6210<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528\u3057\u305f\u6a5f\u5668\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u30de\u30a4\u30b3\u30f3\uff1aM5StickC<\/li><li>\u6e7f\u5ea6\u30fb\u6e29\u5ea6\u30bb\u30f3\u30b5\u30fc\uff1aBME280 \uff08GROVE\u63a5\u7d9a\uff09<\/li><li>CO2\u30bb\u30f3\u30b5\u30fc\uff1aMH-Z19C\uff08\u30b7\u30ea\u30a2\u30eb\u63a5\u7d9a\uff09<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">CO2\u30bb\u30f3\u30b5\u30fc\u306f\u30b7\u30ea\u30a2\u30eb\u63a5\u7d9a\u306a\u306e\u3067\u3001M5StickC\u306eG0\/G26\u3092TX\/RX\u3068\u3057\u3066\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059\u3002\u96fb\u6e90\u306f5V\u306a\u306e\u3067\u3053\u308c\u3082M5StickC\u304b\u3089\u4f9b\u7d66\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6e29\u6e7f\u5ea6\u30bb\u30f3\u30b5\u30fc\u306fGROVE\u63a5\u7d9a\u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307eM5StickC\u306eGROVE\u7aef\u5b50\u306b\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8d64\u5916\u7dda\u30ab\u30e1\u30e9\u3067\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3001\uff08\u78ba\u8a8d\u306e\u305f\u30811\u5206\u3054\u3068\u306b\u8a08\u6e2c\u30fb\u9001\u4fe1\uff09\u9023\u7d9a\u52d5\u4f5c\u3057\u305f\u72b6\u614b\u3067\u6700\u3082\u9ad8\u6e29\u306b\u306a\u308b\u306e\u306fM5StickC\u3067\u3057\u305f\u3002\u305d\u308c\u3067\u3082\u5ba4\u6e2924\u7a0b\u5ea6\u306e\u6642\u3067M5StickC\u306e\u8868\u9762\u6e29\u5ea6\u306f30\u5ea6\u7a0b\u5ea6\u306a\u306e\u3067\u3001\u7279\u306b\u652f\u969c\u306f\u306a\u3044\u3068\u8003\u3048\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2\"><\/span>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">M5StickC\u7528\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u4f8b\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306fCO2\u3001\u6e7f\u5ea6\u30fb\u6e29\u5ea6\u3092\u8a08\u6e2c\u3057\u5f8c\u8ff0\u3059\u308bGAS\u3078JSON\u5f62\u5f0f\u30c7\u30fc\u30bf\u3092POST\u3057\u3066\u3044\u307e\u3059\u3002\u304a\u304a\u3088\u305d5\u5206\u3054\u3068\u306b\u8a08\u6e2c\u30fb\u9001\u4fe1\u3057\u307e\u3059\u3002\u3053\u306e\u307e\u307e\u3060\u3068WiFi\u304c\u4e00\u5ea6\u5207\u65ad\u3055\u308c\u308b\u3068\u5fa9\u65e7\u3057\u306a\u3044\u306e\u3067\u3001\u4f55\u3089\u304b\u306e\u5bfe\u51e6\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u753b\u9762\u8868\u793a\u3092\u6b62\u3081\u305f\u308a\u3001Deep Sleep\u3055\u305b\u308b\u306a\u3069\u3059\u308c\u3070\u3001\u3082\u3063\u3068\u6d88\u8cbb\u96fb\u529b\u3092\u4e0b\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2021\/05\/29 \u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u4e00\u90e8\u66f4\u65b0\u3002\u9001\u4fe1\u30df\u30b9\u304c\u7d9a\u3044\u305f\u3089RESET\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#include &amp;lt;M5StickC.h&gt;\n#include &amp;lt;WiFi.h&gt;\n#include &amp;lt;HTTPClient.h&gt;\n#include &amp;lt;Wire.h&gt;\n#include &quot;Seeed_BME280.h&quot;\n\nconst char* ssid = &quot;!!!SSID!!!&quot;;\nconst char* password = &quot;!!!WiFi PASSWORD!!!&quot;;\n\nconst char* published_url = &quot;!!!GAS URL!!!&quot;;\n\nBME280 bme280;\n\nuint8_t co2Command&#x5B;9];\nuint8_t co2data&#x5B;9];\nint count = 0;\nint width, height;\n\nint getCO2() {\n  int value = -1;\n\n  Serial2.readBytes(co2data, 9);\n\n  if ((co2data&#x5B;0] == 0xff) &amp;amp;&amp;amp; (co2data&#x5B;1] == 0x86)) {\n    value = (int)co2data&#x5B;2] * 256 + (int)co2data&#x5B;3];\n  } else {\n    ;\n  }\n\n  return value;\n}\n\nvoid co2Init() {\n  co2Command&#x5B;0] = 0xff;\n  co2Command&#x5B;1] = 0x01;\n  co2Command&#x5B;2] = 0x86;\n  co2Command&#x5B;3] = 0x00;\n  co2Command&#x5B;4] = 0x00;\n  co2Command&#x5B;5] = 0x00;\n  co2Command&#x5B;6] = 0x00;\n  co2Command&#x5B;7] = 0x00;\n  co2Command&#x5B;8] = 0x79;\n\n  \/\/ Serial2.begin(9600, SERIAL_8N1, 32, 33);\n  Serial2.begin(9600, SERIAL_8N1, 0, 26);\n\n  M5.Lcd.fillScreen(BLACK);\n  M5.Lcd.setCursor(0, 0);\n  M5.Lcd.print(&quot;CO2 sensor initialize &quot;);\n  Serial.print(&quot;CO2 sensor initialize&quot;);\n  delay(100);\n  int value;\n  while ((value = getCO2()) == 500) {\n    Serial.print(&quot;.&quot;);\n    M5.Lcd.print(&quot;.&quot;);\n    delay(1000);\n  }\n  Serial.println(&quot;CO2 sensor start&quot;);\n}\n\nvoid wifiInit() {\n  WiFi.mode(WIFI_STA);\n  WiFi.disconnect(true);\n  delay(1000);\n  Serial.println(ssid);\n  \/\/ esp_wifi_restore(); \/\/ \u3069\u3046\u3084\u3063\u3066\u3082WiFi\u304c\u52d5\u304b\u306a\u304f\u306a\u3063\u305f\u3089\u5b9f\u884c\u3059\u308b\u3068\u826f\u3044\uff1f\n\n  WiFi.begin(ssid, password);\n\n  M5.Lcd.fillScreen(BLACK);\n  M5.Lcd.setCursor(0, 0);\n  M5.Lcd.print(&quot;WiFi initialize &quot;);\n\n  while (WiFi.status() != WL_CONNECTED) {\n    delay(500);\n    Serial.print(&quot;.&quot;);\n    M5.Lcd.print(&quot;.&quot;);\n  }\n}\n\nint sendFailCount = 0;\n\nvoid sendJson(char *json) {\n  HTTPClient http;\n\n  http.begin(published_url);\n  int httpCode = http.POST(json);\n \n  if (httpCode &gt; 0) {\n    if (httpCode == HTTP_CODE_OK) {\n      Serial.println(&quot;http\/post success&quot;);\n      String payload = http.getString();\n    }\n  } else {\n    Serial.printf(&quot;http\/post error: %s\\n&quot;, http.errorToString(httpCode).c_str());\n    M5.Lcd.print(&quot;wifi\/post fail &quot;);\n    M5.Lcd.print(sendFailCount);\n    sendFailCount++;\n    if (sendFailCount &gt; 2) {\n      delay(1000);\n      esp_restart();\n    }\n  }\n \n  http.end();\n\n}\n\nvoid setup() {\n\n  M5.begin();\n  M5.Axp.ScreenBreath(8);\n  M5.Lcd.setRotation(3);\n  M5.Lcd.setTextSize(1);\n  M5.Lcd.fillScreen(BLACK);\n\n  width = M5.Lcd.width();\n  height = M5.Lcd.height();\n\n  wifiInit();\n\n  co2Init();\n\n  if(!bme280.init()){\n    Serial.println(&quot;bme280 error&quot;);\n  }\n  Serial.println(&quot;BME280 init finish&quot;);\n\n  M5.Lcd.fillScreen(BLACK);\n}\n\nvoid loop() {\n  Serial2.write(co2Command, 9);\n  delay(100);\n\n  float h = bme280.getHumidity();\n  float t = bme280.getTemperature();\n  float v = (float)analogRead(33) * 3.3f \/ 4095.0f;\n  \n  int co2Value = getCO2();\n  if (co2Value != -1) {\n    char json&#x5B;100];\n    sprintf(json, &quot;{\\&quot;co2\\&quot;: \\&quot;%d\\&quot; , \\&quot;humi\\&quot;: \\&quot;%f\\&quot; , \\&quot;temp\\&quot;: \\&quot;%f\\&quot; , \\&quot;voltage\\&quot;: \\&quot;%f\\&quot; }&quot;, co2Value, h, t, v);\n    Serial.println(json);\n    sendJson(json);\n\n    M5.Lcd.setCursor(0, 0);\n    M5.Lcd.print(&quot;CO2 &quot;);\n    M5.Lcd.print(co2Value);\n    M5.Lcd.println(&quot; ppm&quot;);\n\n    \/\/ M5.Lcd.setCursor(5, 15);\n    M5.Lcd.print(&quot;H\/T : &quot;);\n    M5.Lcd.print(h);\n    M5.Lcd.print(&quot; \/ &quot;);\n    M5.Lcd.print(t);\n\n    int bH = height\/2 \/ (log(50000) - log(400)) * (log(co2Value)-log(400));\n    M5.Lcd.drawLine(count, height, count, height-2-bH, WHITE);\n    M5.Lcd.drawLine(count+1, height, count+1, height-2-height\/2, BLACK);\n  } else {\n    M5.Lcd.setCursor(0, 0);\n    M5.Lcd.println(&quot;CO2 error&quot;);\n    Serial.print(&quot;illegal &quot;);\n    Serial.print(co2data&#x5B;0]);\n    Serial.print(&quot;,&quot;);\n    Serial.println(co2data&#x5B;1]);\n  }\n\n  count++;\n  if (count &gt; width) {\n    count = 0;\n  }\n\n  \/\/ delay(60000LL); \/\/ 1\u5206\u3054\u3068\n  delay(300000LL); \/\/ 5\u5206\u3054\u3068\n  \/\/ delay(600000LL); \/\/ 10\u5206\u3054\u3068\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%97%E4%BF%A1%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2%EF%BC%88Gdrive_Google_Apps_Script%EF%BC%89\"><\/span>\u53d7\u4fe1\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\uff08Gdrive \/ Google Apps Script\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Gdrive\u4e0a\u306bSpreadsheet\u3092\u4f5c\u6210\u3057\u3001\u30c4\u30fc\u30eb\u2192\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u304b\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3001Web\u30a2\u30d7\u30ea\u3068\u3057\u3066\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u3068\u304d\u306b\u751f\u6210\u3055\u308c\u308bURL\u3092\u4e0a\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\uff08published_url\uff09\u3067\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f\u53d7\u4fe1\u30c7\u30fc\u30bf\u3092Spreadsheet\u306b\u8ffd\u8a18\u3057\u3066\u3044\u304f\u3060\u3051\u3067\u3059\u3002\u5b9f\u969b\u306b\u306f\u30bf\u30a4\u30de\u30fc\u99c6\u52d5\u578b\u7b49\u306e\u51e6\u7406\u3067\u5b9a\u671f\u7684\u306a\u53d7\u4fe1\u30c1\u30a7\u30c3\u30af\u3001\u7570\u5e38\u5024\u30c1\u30a7\u30c3\u30af\u3092\u3059\u308b\u3079\u304d\u3067\u3059\u3002\u79c1\u306f\u53d7\u4fe1\u30c1\u30a7\u30c3\u30af\uff08\u4e00\u5b9a\u671f\u9593\u4ee5\u4e0aPOST\u304c\u306a\u3044\uff09\u3068\u7570\u5e38\u5024\u30c1\u30a7\u30c3\u30af\u3092\u3057\u3066\u30e1\u30fc\u30eb\u901a\u77e5\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction doPost(ee) {\n  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()&#x5B;0];\n  var values = JSON.parse(ee.postData.getDataAsString());\n  sheet.appendRow(&#x5B;new Date(), values.humi, values.temp, values.co2]);\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u65b0\u578b\u30b3\u30ed\u30ca\u30a6\u30a4\u30eb\u30b9\u611f\u67d3\u62e1\u5927\u9632\u6b62\u306e\u89b3\u70b9\u3068\u7d50\u9732\u9632\u6b62\u306e\u89b3\u70b9\u304b\u3089\u7814\u7a76\u5ba4\u3067CO2\u3068\u6e7f\u5ea6\u30fb\u6e29\u5ea6\u3092\u8a08\u6e2c\u3059\u308b\u30a8\u30c3\u30b8\u30c7\u30d0\u30a4\u30b9\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u3082\u3068\u3082\u3068\u7814\u7a76\u5ba4\u306f\u88cf\u5c71\u306e\u5f71\u97ff\u3067\u590f\u671f\u306b\u6e7f\u5ea6\u304c\u9ad8\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u9664\u6e7f\u6a5f\u306e\u904b\u7528\u304c\u4e0d\u53ef\u6b20\u3067\u3059\u3002\u3053\u308c\u3092 <a class=\"more-link\" href=\"https:\/\/www.amano-labo.jp\/pages\/tips\/2197\/\">\u7d9a\u304d\u3092\u8aad\u3080\u2026<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,8,4],"tags":[36,31,10],"class_list":["post-2197","post","type-post","status-publish","format-standard","hentry","category-software","category-hardware","category-tips","tag-arduino","tag-google-apps-script","tag-last"],"_links":{"self":[{"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/posts\/2197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/comments?post=2197"}],"version-history":[{"count":5,"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/posts\/2197\/revisions"}],"predecessor-version":[{"id":2205,"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/posts\/2197\/revisions\/2205"}],"wp:attachment":[{"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/media?parent=2197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/categories?post=2197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amano-labo.jp\/pages\/wp-json\/wp\/v2\/tags?post=2197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}