{"id":1131,"date":"2017-06-29T22:15:16","date_gmt":"2017-06-29T13:15:16","guid":{"rendered":"http:\/\/www.mizutan.com\/wordpress\/?p=1131"},"modified":"2025-09-26T20:23:53","modified_gmt":"2025-09-26T11:23:53","slug":"post-1131","status":"publish","type":"post","link":"https:\/\/www.mizutan.com\/wordpress\/?p=1131","title":{"rendered":"sense hat\u3067\u6e2c\u5b9a\u3057\u305f\u6e29\u5ea6\u3068\u6e7f\u5ea6\u53ca\u3073\u6c17\u5727\u3092python\u3067\u30b0\u30e9\u30d5\u8868\u793a"},"content":{"rendered":"\n<p>\u5e2b\u5320\u306e50\u30aa\u30e4\u30b8\u304c\u3001\u30bb\u30f3\u30b5\u3067\u6e2c\u3063\u305f\u5024\uff08\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u6c17\u5727\u3001\u805e\u3044\u3066\u307f\u305f\u3089\u3001\u571f\u306e\u6e7f\u308a\u6c17\u3084\u592a\u967d\u5149\u306e\u96fb\u5727\u3001\u306f\u3066\u306f\u3001\u96e8\u7c92\u611f\u77e5\u307e\u3067\uff09\u3092\u305f\u3081\u8fbc\u3093\u3067\u3001\u305d\u308c\u3092web\u4e0a\u3067\u30b0\u30e9\u30d5\u306b\u51fa\u3057\u3066\u8868 \u793a\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u77e5\u308a\u307e\u3057\u305f\u3002<br><br>60\u723a\u306f\u3001<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fe0000\" class=\"has-inline-color\">sense hat \u3067\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u6c17\u5727\u306f\u7c21\u5358\u306b\u53d6\u5f97<\/mark><\/strong>\u3067\u304d\u307e\u3059\u3002<br><br>\u305d\u3053\u3067\u3001<strong>\u5e2b\u5320\u306e\u307e\u306d\u3092 \u3057\u3066\u3001\u3053\u308c\u3089\u306e\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3059\u308b<\/strong>\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br><br>\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001python\u3092\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u5148\u306f\u3001\u5e2b\u5320\u306e\u8a00\u3063\u3066\u3044\u305fsqlite3\u306b\u6c7a\u3081\u307e\u3057\u305f\u3002<br><br>\u305d\u306e\u624b\u9806\u3092\u3001\u3053\u3053\u3067\u304a\u77e5\u3089\u305b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<!-- WP QUADS v. 2.0.98  Shortcode Ad -->\n<div class=\"quads-location quads-ad\" id=\"quads-ad\" style=\"float:none;margin:0px 0 0px 0;text-align:center;\">\n\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af\r\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1169427325398969\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<!-- www_\u30a4\u30f3\u30c8\u30ed -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-1169427325398969\"\r\n     data-ad-slot=\"1208333098\"\r\n     data-ad-format=\"rectangle\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><br><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u30b0\u30e9\u30d5\u4f5c\u6210\u624b\u9806<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"180\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2017\/06\/chart_3.jpg\" alt=\"\" class=\"wp-image-2547\"\/><\/figure>\n<\/div>\n\n\n<p>\u624b\u9806\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u30c7\u30fc\u30bf\u53d6\u5f97\u30d7\u30ed\u30b0\u30e9\u30e0\u4f5c\u6210<\/strong><\/li>\n\n\n\n<li><strong>\u6c7a\u307e\u3063\u305f\u6642\u9593\u3054\u3068\u306b\u30c7\u30fc\u30bf\u53d6\u5f97<\/strong><\/li>\n\n\n\n<li><strong>\u30b0\u30e9\u30d5\u4f5c\u6210<\/strong><\/li>\n\n\n\n<li><strong>\u30b0\u30e9\u30d5\u306e\u8868\u793a<\/strong><\/li>\n<\/ol>\n\n\n\n<p>\u3055\u3066\u3055\u3066\u3001\u3069\u306e\u304f\u3089\u3044\u3067\u3067\u304d\u308b\u304b\u306a\u3002\u697d\u3057\u307f\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c7\u30fc\u30bf\u53d6\u5f97\u30d7\u30ed\u30b0\u30e9\u30e0\u4f5c\u6210<\/h3>\n\n\n\n<p>\u307e\u305a\u306f\u3001\u53d6\u308a\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u3092sqlite3\u306b\u305f\u3081\u8fbc\u3080\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u2460 \u30c7\u30fc\u30bf\u53d6\u5f97\u306f\u3001sense hat \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u7c21\u5358\u306b\u53d6\u5f97\u3067\u304d\u308b\u3002<br>\u2461 \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30aa\u30fc\u30d7\u30f3\u3001\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092 insert \u3059\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code># sqlite3 \u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\n import sqlite3\n# datetime \u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\n import datetime\n# sense hat\n from sense_hat import SenseHat\n sense = SenseHat()\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\n dbpath = &#39;\/xxxxxx\/xxxxxx\/sqlite3\/xxxxx_db.sqlite&#39;\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3068\u30ab\u30fc\u30bd\u30eb\u751f\u6210\n connection = sqlite3.connect(dbpath)\n cursor = connection.cursor()\n# \u73fe\u5728\u306e\u6642\u9593\u3092\u53d6\u5f97\nnow = datetime.datetime.now()\nti = now.strftime(&quot;%Y-%m-%d %H:%M:%S&quot;)\n# \u6c17\u6e29\u3001\u6c17\u5727\u3001\u6e7f\u5ea6\u306e\u53d6\u5f97\nte = sense.get_temperature()\npr = sense.get_pressure()\nhu = sense.get_humidity()\n# \u30a8\u30e9\u30fc\u51e6\u7406\uff08\u4f8b\u5916\u51e6\u7406\uff09\ntry:\n# CREATE\n# cursor.execute(&quot;DROP TABLE IF EXISTS graph_data&quot;)\n    cursor.execute(&quot;CREATE TABLE IF NOT EXISTS graph_data ( time text, temp real, pres real, humi real)&quot;)\n# INSERT\n insert_sql = &#39;INSERT INTO xxxxx_data ( time , temp , pres , humi ) VALUES ( ? , ? , ? , ? )&#39;\n  graph_data = ( ti , te , pr , hu )\n  cursor.execute(insert_sql,xxxxx_data )\n  except sqlite3.Error as e:\n  print(&#39;sqlite3.Error occurred:&#39;, e.args[0])\n# \u4fdd\u5b58\u3092\u5b9f\u884c\uff08\u5fd8\u308c\u308b\u3068\u4fdd\u5b58\u3055\u308c\u306a\u3044\u306e\u3067\u6ce8\u610f\uff09\n  connection.commit()\n# \u63a5\u7d9a\u3092\u9589\u3058\u308b\n  connection.close()<\/code><\/pre><\/div>\n\n\n\n<p>\u96e3\u3057\u3044\u3068\u3053\u308d\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br><br>\u3067\u3082\u300160\u723a\u306f\u52c9\u5f37\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br><br><span data-color=\"#ffff00\" style=\"background: linear-gradient(transparent 60%,rgba(255, 255, 0, 0.7) 0);\" class=\"vk_highlighter\">\u65e5\u7a0b\u53ca\u3073\u6642\u9593\u306e\u53d6\u5f97\u3001\u30ab\u30fc\u30bd\u30eb\u306e\u4f7f\u3044\u65b9\u306a\u3069\u3001\u3057\u3070\u3089\u304f\u3076\u308a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u3001\u8e93\u304d\u306a\u304c\u3089\u3082\u697d\u3057\u3044\u6642\u9593\u3092\u904e\u3054\u3057\u307e\u3057\u305f\u3002<\/span><br><br>\u305d\u308c\u306b\u3057\u3066\u3082\u3001\u5148\u4eba\u306e\u7686\u3055\u3093\u306f\u7d20\u6674\u3089\u3057\u3044\u3002<br><br><strong>\u6709\u7528\u306a\u60c5\u5831\u304c\u3042\u3061\u3053\u3061\u306b\u3042\u3063\u3066\u3001\u305d\u308c\u3089\u3092\u53c2\u8003\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308a\u4e0a\u3052\u307e\u3057\u305f\u3002<\/strong><\/p>\n\n\n\n<!-- WP QUADS v. 2.0.98  Shortcode Ad -->\n<div class=\"quads-location quads-ad\" id=\"quads-ad\" style=\"float:none;margin:0px 0 0px 0;text-align:center;\">\n\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af\r\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1169427325398969\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block; text-align:center;\"\r\n     data-ad-layout=\"in-article\"\r\n     data-ad-format=\"fluid\"\r\n     data-ad-client=\"ca-pub-1169427325398969\"\r\n     data-ad-slot=\"8169621401\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><br><\/div>\n\n\n\n\n<h3 class=\"wp-block-heading\">\u6c7a\u307e\u3063\u305f\u6642\u9593\u3054\u3068\u306b\u30c7\u30fc\u30bf\u53d6\u5f97<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"510\" height=\"340\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2017\/06\/chart_4.png\" alt=\"\u30c7\u30fc\u30bf\u53d6\u5f97\u306e\u30a4\u30e1\u30fc\u30b8\u306e\u753b\u50cf\" class=\"wp-image-2548\"\/><\/figure>\n<\/div>\n\n\n<p>\u3053\u308c\u306f\u3001\u7c21\u5358\u3067\u3059\u3002crontab\u3092\u4f7f\u7528\u3057\u3066\u3001\u4e00\u5b9a\u6642\u9593\u3054\u3068\u306b\u4e0a\u8a18\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8d77\u52d5\u3057\u307e\u3059 \u3002\u4eca\u56de\u300115\u5206\u3054\u3068\u306b\u52d5\u304b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>*\/15 * * * * sudo python3 \/home\/pi\/python_pg\/graph_data\/data_pro.py<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b0\u30e9\u30d5\u4f5c\u6210<\/h3>\n\n\n\n<p>\u3053\u3053\u3067\u3001\u5c11\u3057\u6642\u9593\u3092\u53d6\u3089\u308c\u307e\u3057\u305f\u3002<br><br>\u4e16\u306e\u4e2d\u3001\u30b0\u30e9\u30d5\u4f5c\u6210\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u3093\u3067\u3059\u306d\u3002\u3044\u3084\u30fc\u3001\u9a5a\u304d\u307e\u3057\u305f\u3002<br><br>60\u723a\u306f\u3001\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3059\u308b\u306e\u306b\u7279\u306b\u3053\u3060\u308f\u308a\u306f\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001<strong>\u7c21\u5358\u306b\u3067\u304d\u308b\u3082\u306e\u304c\u3044\u3044\u306a\u3068\u601d\u3063\u3066\u9078\u3073\u307e\u3057\u305f\u3002<br><\/strong><br>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3084\u3001\u74b0\u5883\u8a2d\u5b9a\u304c\u5acc\u3060\u3063\u305f\u306e\u3067\u3001\u7d50\u5c40\u3001Google Charts \u3092\u9078\u3073\u307e\u3057\u305f\u3002<br><br>\u3053\u308c\u306f\u3001<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fe0000\" class=\"has-inline-color\">Google Charts \u5411\u3051\u306eHTML\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308c\u3070\u3001web \u4e0a\u3067\u30b0\u30e9\u30d5\u3092\u4f5c\u3063\u3066\u304f\u308c\u308b<\/mark><\/strong>\u305d\u3046\u3067\u3059\u3002<br><br>web \u3092\u30b0\u30b0\u3063\u3066\u3001\u53c2\u8003\u306b\u306a\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u3042\u3055\u308a\u307e\u3057\u305f\u3002<br><br>\u3042\u3063\u3055\u308a\u3068\u3067\u304d\u308b\u3082\u306e\u304c\u306a\u304b\u3063\u305f\u306e\u3067\u3001<span data-color=\"#ffff00\" style=\"background: linear-gradient(transparent 60%,rgba(255, 255, 0, 0.7) 0);\" class=\"vk_highlighter\">\u8a66\u884c\u932f\u8aa4\u306e\u7d50\u679c\u3001\u6b21\u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5b8c\u6210\u3057\u307e\u3057\u305f\u3002\u3044\u3084\u30fc\u3001\u306a\u304b\u306a\u304b\u5927\u5909\u3067\u3057\u305f\u3002<\/span><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import os\nimport sys\n\n# sqlite3 \u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\nimport sqlite3\n\n# datetime\nimport datetime\n\nargvs = sys.argv\nargc  = len(argvs)\nhtml_path = &#39;\/home\/pi\/python_pg\/graph_data\/&#39;\nif(argc == 2):\n    html_path = argvs[1] + os.sep\n\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\ndbpath = &#39;\/home\/pi\/sqlite3\/graph_data_db.sqlite&#39;\n\n# \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u63a5\u7d9a\u3068\u30ab\u30fc\u30bd\u30eb\u751f\u6210\nconnection = sqlite3.connect(dbpath)\ncursor = connection.cursor()\n\n# \u672c\u65e5\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\ndate_format = &#39;%Y-%m-%d %H:%M:%S&#39;\nd = datetime.datetime.today()\n\n# \u73fe\u6642\u70b9\u3088\u308a10\u65e5\u524d\u306e\u65e5\u4ed8\u3092\u53d6\u5f97\nd -= datetime.timedelta(days = 10)\ndate_string_output = d.strftime(date_format)\n\nlines = [&#39;&#39;]\n\nlines.append(&quot;&lt;html&gt;\\n&quot;)\nlines.append(&quot;  &lt;head&gt;\\n&quot;)\nlines.append(&quot;    \\n&quot;)\nlines.append(&#39;    &lt;script type=&quot;text\/javascript&quot; src=&quot;https:\/\/www.google.com\/jsapi&quot;&gt;&lt;\/script&gt;\\n&#39;)\nlines.append(&#39;    &lt;script type=&quot;text\/javascript&quot;&gt;\\n&#39;)\nlines.append(&#39;      google.load(&quot;visualization&quot;, &quot;1&quot;, {packages:[&quot;corechart&quot;]});\\n&#39;)\nlines.append(&quot;    \\n&quot;)\nlines.append(&quot;      google.setOnLoadCallback(drawChart);\\n&quot;)\nlines.append(&quot;    \\n&quot;)\nlines.append(&quot;      function drawChart() {\\n&quot;)\nlines.append(&quot;    \\n&quot;)\nlines.append(&quot;        var data = google.visualization.arrayToDataTable([\\n&quot;)\nlines.append(&quot;        [&#39;\u5e74\u5ea6&#39;, &#39;\u6c17\u5727(hPa)&#39;],\\n&quot;)\n\n# \u30a8\u30e9\u30fc\u51e6\u7406\uff08\u4f8b\u5916\u51e6\u7406\uff09\ntry:\n    # select \u6642\u9593\u3001\u6c17\u5727\u3092\u8aad\u53d6\u308b\n    select_sql = &#39;select time,pres from graph_data where time &gt;= ?&#39;\n    for row in cursor.execute( select_sql , (date_string_output,) ):\n        str_row = str(row)\n        str_row = str_row.replace(&#39;(&#39;, &#39;[&#39;)\n        str_row = str_row.replace(&#39;)&#39;, &#39;]&#39;)\n        str_row = &#39;        &#39; + str_row +  &#39;,\\n&#39;\n        lines.extend(str_row)\n\nexcept sqlite3.Error as e:\n    print(&#39;sqlite3.Error occurred:&#39;, e.args[0])\n\nlines.append(&quot;        ]);\\n&quot;)\nlines.append(&quot;    \\n&quot;)\nlines.append(&quot;        var options = {\\n&quot;)\nlines.append(&quot;          title: &#39;\u6c17\u5727&#39;,\\n&quot;)\nlines.append(&quot;        vAxis: {\\n&quot;)\nlines.append(&quot;          minValue: 900,\\n&quot;)\nlines.append(&quot;          maxValue: 1100,\\n&quot;)\nlines.append(&quot;          ticks: [900,950,1000,1050,1100] }\\n&quot;)\nlines.append(&quot;        };\\n&quot;)\nlines.append(&quot;    \\n&quot;)\nlines.append(&quot;        var chart = new google.visualization.LineChart(document.getElementById(&#39;chart_div&#39;));\\n&quot;)\nlines.append(&quot;        chart.draw(data, options);\\n&quot;)\nlines.append(&quot;      }\\n&quot;)\nlines.append(&quot;    &lt;\/script&gt;\\n&quot;)\nlines.append(&quot;  &lt;\/head&gt;\\n&quot;)\nlines.append(&quot;  &lt;body&gt;\\n&quot;)\nlines.append(&#39;    &lt;div id=&quot;chart_div&quot; style=&quot;height: 400px; width: 80%;&quot;&gt;&lt;\/div&gt;\\n&#39;)\nlines.append(&quot;  &lt;\/body&gt;\\n&quot;)\nlines.append(&quot;&lt;\/html&gt;\\n&quot;)\n\nwith open(html_path + &#39;pres_display.html&#39;,&#39;w&#39;) as f:\n    f.writelines(lines)<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u3061\u3089\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u9577\u3044\u3067\u3059\u304c\u3001\u305d\u308c\u307b\u3069\u96e3\u3057\u3044\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br><br>\u307e\u305a\u3001<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fe0000\" class=\"has-inline-color\">\u30b0\u30e9\u30d5\u3092\u51fa\u3059\u3053\u3068\u306e\u3067\u304d\u308bHTML\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306b\u5c02\u5ff5<\/mark><\/strong>\u3057\u307e\u3057\u305f\u3002<br><br>\u305d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u305f\u5f8c\u3001\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u53d6\u8fbc\u3080\u3053\u3068\u3092\u512a\u5148\u3057\u305f\u3053\u3068\u3067\u4f5c\u6210\u3067\u304d\u307e\u3057\u305f\u3002<br><br>\u305d\u306e\u4ed6\u306f\u3001<span data-color=\"#ffff00\" style=\"background: linear-gradient(transparent 60%,rgba(255, 255, 0, 0.7) 0);\" class=\"vk_highlighter\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8aad\u8fbc\u307f\uff08OPEN\uff09\u3001\u8aad\u51fa\u3057\uff08SELECT\uff09\u7b49\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff08cursol\u306e\u4f7f\u3044\u65b9\uff09\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3001\u307e\u305f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u53d6\u51fa\u3057\u306b\u3001\u3044\u308d\u3044\u308d\u60a9\u307f\u307e\u3057\u305f\u3002<br><\/span><br>\u307e\u305f\u30012\u65e5\u524d\u304b\u3089\u306e\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3059\u308b\u65b9\u6cd5\u306e\u8abf\u67fb\u3001\u305d\u3057\u3066\u3001\u8aad\u51fa\u3057\u305f\u30c7\u30fc\u30bf\u3092\u30b0\u30e9\u30d5\u7528\u306b\u5408\u308f\u305b\u308b\u305f\u3081\u3001\u6587\u5b57\u5217\u64cd\u4f5c\u3092\u884c\u308f\u306d\u3070\u306a\u3089\u305a\u3001\u3053\u3061\u3089\u3082\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u540c\u69d8\u3001\u3044\u308d\u3044\u308d\u8abf\u3079\u307e\u3057\u305f\u3002<br><br>\u307e\u30a2\u3001<strong>\u4e45\u3005\u306b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u3057\u305f\u306e\u3067\u9762\u767d\u304b\u3063\u305f<\/strong>\u3067\u3059\u306d\u3002<br><br>\u4e0a\u8a18\u306e\u30b0\u30e9\u30d5\u4f5c\u6210\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u6e29\u5ea6\u53ca\u3073\u6e7f\u5ea6\u3092\u30b0\u30e9\u30d5\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002<br><br>\u3067\u3059\u306e\u3067\u3001\u4e2d\u8eab\u3092\u3044\u304f\u3064\u304b\u5909\u66f4\u3057\u3066\u3001\u5225\u9014\u3001\u6c17\u5727\u3092\u30b0\u30e9\u30d5\u306b\u66f8\u304d\u51fa\u3059\u30d7\u30ed\u30b0\u30e9\u30e0\u3082\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<!-- WP QUADS v. 2.0.98  Shortcode Ad -->\n<div class=\"quads-location quads-ad\" id=\"quads-ad\" style=\"float:none;margin:0px 0 0px 0;text-align:center;\">\n\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af\r\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1169427325398969\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block; text-align:center;\"\r\n     data-ad-layout=\"in-article\"\r\n     data-ad-format=\"fluid\"\r\n     data-ad-client=\"ca-pub-1169427325398969\"\r\n     data-ad-slot=\"9186857477\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div>\n\n\n\n\n<h3 class=\"wp-block-heading\">\u30b0\u30e9\u30d5\u306e\u8868\u793a <\/h3>\n\n\n\n<p>\u6b21\u306b\u3001\u51fa\u6765\u4e0a\u304c\u3063\u305f\u30b0\u30e9\u30d5\u8868\u793a\u306eHTML\u3092\u300160\u723a\u306e\u30d6\u30ed\u30b0\u3078\u8ee2\u9001\u3057\u307e\u3059\u3002<br><br>\u3053\u3053\u306f\u3001ftp\u3067\u3084\u308d\u3046\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u5e2b\u5320\u306e50\u30aa\u30e4\u30b8\u304b\u3089<a href=\"https:\/\/www.mizutan.com\/wordpress\/?p=1129\" data-type=\"post\" data-id=\"1129\">sshfs\u306a\u308b\u4fbf\u5229\u306a\u30c4\u30fc\u30eb<\/a>\u304c\u3042\u308b\u3068\u805e\u3044\u305f\u306e\u3067\u3001\u6025\u907d\u3001\u305d\u308c\u3092\u53d6\u308a\u8fbc\u307f\u307e\u3057\u305f\u3002<br><br>\u5148\u307b\u3069\u3001\u30c7\u30fc\u30bf\u53d6\u5f97\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u309215\u5206\u3054\u3068\u306b\u52d5\u304b\u3057\u307e\u3057\u305f\u3002\u305d\u308c\u306b\u7d9a\u304d\u3001\u6e29\u5ea6\u30fb\u6e7f\u5ea6\u30d7\u30ed\u30b0\u30e9\u30e0\u3001\u6c17\u5727\u30d7\u30ed\u30b0\u30e9\u30e0\u3001HTML\uff08\u6e29\u5ea6\u3001\u6e7f\u5ea6\uff09\u3001HTML\uff08\u6c17\u5727\uff09\u3082\u300115\u5206\u3054\u3068\u306b\u52d5\u304b\u3055\u306d\u3070\u306a\u308a\u307e\u305b\u3093\u3002<br><br>\u3057\u304b\u3057\u3001crontab \u306f\u3001\u4e26\u3079\u3066\u66f8\u3044\u3066\u3082\u3001\u4e0a\u304b\u3089\u9806\u306b\u5b9f\u65bd\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002<br><br>\u305d\u3053\u3067\u3001\u3053\u308c\u3089\uff15\u3064\u3092shell\u306b\u3057\u3066\u3001\u3053\u306eshell\u309215\u5206\u3054\u3068\u306b\u52d5\u304b\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>#!\/bin\/bash\nsudo python3 \/xxxxxxxxx\/data_pro.py\nsudo python3 \/xxxxxxxxx\/write_html.py\nsudo cp \/xxxxxxxxx\/temp_humi_display.html \/xxxxxxxxx\/Raspi\nsudo python3 \/xxxxxxxxx\/write_pres_html.py\nsudo cp \/xxxxxxxxx\/pres_display.html \/xxxxxxxxx\/Raspi<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>*\/15 * * * * sudo sh \/home\/pi\/python_pg\/graph_data\/display.sh<\/code><\/pre><\/div>\n\n\n\n<p>\u305d\u3053\u3067\u3001\u3067\u304d\u305f\u30b0\u30e9\u30d5\u304c\u3053\u3061\u3089\u3067\u3059\u3002\u306a\u304b\u306a\u304b\u3044\u3044\u3067\u3059\u306d\u3002<br><br>\u305f\u3060\u3001sense hat \u3067\u6e2c\u5b9a\u3057\u305f\u6e29\u5ea6\u306f\u3001\u30e9\u30ba\u30d1\u30a4\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u95a2\u4fc2\u304b\u5e38\u664235\u2103\u4ee5\u4e0a\u306e\u9ad8\u3044\u5024\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u5b9f\u969b\u306e\u6c17\u6e29\u3068\u306f\u6570\u5024\u304c\u96e2\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<br><br>\u30c7\u30fc\u30bf\u304c\u305f\u307e\u3063\u305f\u3089\u3001\uff12\u65e5\u524d\u3067\u306a\u304f\u300110\u65e5\u524d\u304b\u3089\u3068\u304b\u3001\uff11\u30f6\u6708\u524d\u304b\u3089\u3068\u304b\u306e\u9577\u671f\u7684\u306a\u30b0\u30e9\u30d5\u306b\u5909\u3048\u3066\u307f\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background has-medium-font-size\">\u3010\u6e29\u5ea6\u30fb\u6e7f\u5ea6\u3011\n<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"340\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2017\/06\/temp.jpg\" alt=\"\" class=\"wp-image-1195\"\/><\/figure>\n<\/div>\n\n\n<p class=\"has-light-green-cyan-background-color has-background has-medium-font-size\">\u3010\u6c17\u5727\u3011 <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1428\" height=\"951\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2017\/07\/pres.jpg\" alt=\"\" class=\"wp-image-1280\"\/><\/figure>\n\n\n\n<!-- WP QUADS v. 2.0.98  Shortcode Ad -->\n<div class=\"quads-location quads-ad\" id=\"quads-ad\" style=\"float:none;margin:0px 0 0px 0;text-align:center;\">\n\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af\r\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-1169427325398969\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<!-- www_\u8a18\u4e8b\u4e2d\uff13 -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-1169427325398969\"\r\n     data-ad-slot=\"8208817721\"\r\n     data-ad-format=\"rectangle\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><br><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u6700\u5f8c\u306b<\/h2>\n\n\n\n<p>sense hat\u3067\u6e2c\u5b9a\u3057\u305f\u30c7\u30fc\u30bf\u3092\u6c7a\u307e\u3063\u305f\u6642\u9593\u306b\u305f\u3081\u8fbc\u3093\u3067\u3044\u304d\u3001\u305d\u308c\u3092\u30b0\u30e9\u30d5\u306b\u3059\u308b\u51e6\u7406\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br><br>\u4eca\u56de\u306f\u3001\u4f5c\u6210\u624b\u9806\u306b\u793a\u3057\u305f\u3088\u3046\u306b\u3001\u305d\u308c\u305e\u308c\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u306e\u306b\u56db\u82e6\u516b\u82e6\u3057\u307e\u3057\u305f\u3002<br><br>\u306a\u3093\u305b\u3001\u4e45\u3057\u3076\u308a\u3067\u3057\u305f\u306e\u3067\u3001\u3084\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u307b\u3068\u3093\u3069\u5fd8\u308c\u3066\u304a\u308a\u3001\u8a66\u884c\u932f\u8aa4\u306e\u7e70\u308a\u8fd4\u3057\u3067\u3057\u305f\u3002<br><br>\u3067\u3059\u304c\u3001\u4e45\u3057\u3076\u308a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u4f5c\u696d\u306f\u697d\u3057\u304b\u3063\u305f\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<p>\u25a0\u300csense hat\u3067\u904a\u3076\uff01\u300d\u306e\u8a18\u4e8b\u306f\u6b21\u306e\u901a\u308a\u3067\u3059<\/p>\n\n\n\n<div class=\"blogcard\"><a href=\"https:\/\/www.mizutan.com\/wordpress\/?cat=348\" data-blogcard=\"1\"><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5e2b\u5320\u306e50\u30aa\u30e4\u30b8\u304c\u3001\u30bb\u30f3\u30b5\u3067\u6e2c\u3063\u305f\u5024\uff08\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u6c17\u5727\u3001\u805e\u3044\u3066\u307f\u305f\u3089\u3001\u571f\u306e\u6e7f\u308a\u6c17\u3084\u592a\u967d\u5149\u306e\u96fb\u5727\u3001\u306f\u3066\u306f\u3001\u96e8\u7c92\u611f\u77e5\u307e\u3067\uff09\u3092\u305f\u3081\u8fbc\u3093\u3067\u3001\u305d\u308c\u3092web\u4e0a\u3067\u30b0\u30e9\u30d5\u306b\u51fa\u3057\u3066\u8868 \u793a\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u77e5\u308a\u307e\u3057\u305f\u3002 60\u723a\u306f\u3001sense h [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2546,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[348],"tags":[],"class_list":["post-1131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sense_hat"],"_links":{"self":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1131"}],"version-history":[{"count":19,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1131\/revisions"}],"predecessor-version":[{"id":33853,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1131\/revisions\/33853"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/2546"}],"wp:attachment":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}