{"id":3770,"date":"2018-06-04T09:00:39","date_gmt":"2018-06-04T00:00:39","guid":{"rendered":"http:\/\/www.mizutan.com\/wordpress\/?p=3770"},"modified":"2025-03-17T08:54:17","modified_gmt":"2025-03-16T23:54:17","slug":"post-3770","status":"publish","type":"post","link":"https:\/\/www.mizutan.com\/wordpress\/?p=3770","title":{"rendered":"\u30e9\u30ba\u30d1\u30a4\u96fb\u5149\u63b2\u793a\u677f\/\u5929\u6c17\u4e88\u5831\u306e\u8868\u793a\u5185\u5bb9\u3092\u5909\u3048\u3066\u307f\u308b!RaspberryPi\u3067\u96fb\u5149\u63b2\u793a\u677fpart11"},"content":{"rendered":"\n<p>\u4eca\u56de\u306f\u3001\u5929\u6c17\u4e88\u5831\u306e\u8868\u793a\u3092\u3044\u3058\u304f\u3063\u3066\u307f\u3088\u3046\u304b\u3068\u8003\u3048\u307e\u3059\u3002<br><br>\u73fe\u5728\u3001<strong>\u96fb\u5149\u63b2\u793a\u677f\u306b\u8868\u793a\u3057\u3066\u3044\u308b\u5929\u6c17\u4e88\u5831\u306f\u3059\u3079\u3066\u65e5\u672c\u8a9e<\/strong>\u3067\u3059\u3002<br><br>\u307e\u3042\u3001\u305d\u308c\u3067\u3082\u5b9f\u7528\u306b\u306f\u4f55\u306e\u652f\u969c\u3082\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u307e\u3042\u3001\u6bce\u56de\u8868\u793a\u3055\u308c\u308b\u30e2\u30ce\u306a\u306e\u3067\u3001\u3044\u304f\u3064\u304b\u5909\u5316\u304c\u6b32\u3057\u304f\u306a\u3063\u3066\u304d\u305f\u3093\u3067\u3059\u3002<br><br><span data-color=\"#ffff00\" style=\"background: linear-gradient(transparent 60%,rgba(255, 255, 0, 0.7) 0);\" class=\"vk_highlighter\">\u30c6\u30ec\u30d3\u306e\u5929\u6c17\u4e88\u5831\u306a\u3069\u3067\u306f\u3001\u304a\u5929\u6c17\u306f\u30de\u30fc\u30af\u3067\u793a\u3055\u308c\u3001\u305d\u308c\u3092\u307f\u308c\u3070\u4e00\u767a\u3067\u3001\u3069\u3093\u306a\u5929\u6c17\u304b\u308f\u304b\u308b<\/span>\u3058\u3083\u306a\u3044\u3067\u3059\u304b\u3002<br><br>\u96fb\u5149\u63b2\u793a\u677f\u306b\u3082\u3001\u305d\u308c\u3068\u540c\u3058\u3088\u3046\u306a\u8868\u793a\u304c\u6b32\u3057\u304f\u306a\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br><br>\u305d\u3093\u306a\u3053\u3093\u306a\u3067\u3001<strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#fe0000\" class=\"has-inline-color\">\u304a\u5929\u6c17\u30de\u30fc\u30af\u3092\u51fa\u3059\u3053\u3068\u306b\u30c1\u30e3\u30ec\u30f3\u30b8<\/mark><\/strong>\u3057\u3066\u3044\u304d\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\">\u5929\u6c17\u4e88\u5831\u306e\u8868\u793a\u5185\u5bb9\u3092\u5909\u3048\u308b<\/h2>\n\n\n\n<p>\u96fb\u5149\u63b2\u793a\u677f\u3078\u306e\u5929\u6c17\u4e88\u5831\u306e\u30b9\u30af\u30ed\u30fc\u30eb\u8868\u793a\u3067\u3059\u304c\u3001\u73fe\u72b6\u306f\u5168\u3066\u65e5\u672c\u8a9e\u8868\u793a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"old tenki\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/YRJw7FugYqI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u3053\u308c\u306f\u3001\u6700\u521d\u3001\u96fb\u5149\u63b2\u793a\u677f\u3078\u306e\u8868\u793a\u3092\u3059\u308b\u3053\u3068\u306b\u6ce8\u529b\u3057\u3066\u3044\u305f\u305f\u3081\u3067\u3042\u308a\u3001\u307e\u305f\u3001\u52dd\u624b\u3082\u308f\u304b\u3089\u306a\u3044\u3053\u3068\u3060\u3089\u3051\u3060\u3063\u305f\u3053\u3068\u304c\u3001\u305d\u306e\u7406\u7531\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br><br>\u4eca\u56de\u3001\u65b0\u305f\u306b\u3001\u96fb\u5149\u63b2\u793a\u677f\u3092\u8ffd\u52a0\u3059\u308b\u306b\u5f53\u305f\u308a\u3001\u8868\u793a\u5185\u5bb9\u306b\u5909\u5316\u3092\u3064\u3051\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<br><br>\u305d\u306e\u5185\u5bb9\u306f\u6b21\u306e\u4e8c\u70b9\u3067\u3059\u3002<br>\u2460\u3000\u5929\u6c17\u306f\u3001\u65e5\u672c\u8a9e\u304b\u3089\u3001\u304a\u5929\u6c17\u30de\u30fc\u30af\u306b\u5909\u66f4<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"100\" height=\"34\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/04\/tenkimark.png\" alt=\"\" class=\"wp-image-3916\"\/><\/figure>\n<\/div>\n\n\n<p> \u2461\u3000\u6c17\u6e29\u306f\u3001\u3042\u308b\u6e29\u5ea6\u3092\u5883\u306b\u8272\u3092\u4ed8\u3051\u3066\u8868\u793a<\/p>\n\n\n\n<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u5b9f\u73fe\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u3055\u3066\u3001\u5b9f\u73fe\u65b9\u6cd5\u3067\u3059\u304c\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u2460\u306e\u300c\u304a\u5929\u6c17\u30de\u30fc\u30af\u300d\u3067\u3059\u304c\u3001<a href=\"https:\/\/weather.livedoor.com\/forecast\/webservice\/json\/v1?city=140010\" target=\"_blank\" rel=\"noreferrer noopener\">Livedoor\u5929\u6c17\u306eRSS\u914d\u4fe1\u306e\u30da\u30fc\u30b8<\/a>\u306b\u3042\u308a\u307e\u3059\u306e\u3067\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u3000\u3000\u672c\u65e5\uff1a\u25bcforecasts: &gt; \u25bc0 &gt; image &gt; url<\/li>\n\n\n\n<li>\u3000\u3000\u660e\u65e5\uff1a\u25bcforecasts: &gt; \u25bc1 &gt; image &gt; url <\/li>\n<\/ul>\n\n\n\n<p>\u2461\u306e\u300c\u6c17\u6e29\u300d\u3082\u540c\u3058\u30da\u30fc\u30b8\u306b\u3042\u308a\u307e\u3059\u3002\u8868\u793a\u306b\u306f\u3001\u660e\u65e5\u306e\u3082\u306e\u3060\u3051\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u3000\u3000\u6700\u4f4e\u6c17\u6e29\uff1a\u25bcforecasts: &gt; \u25bc1 &gt; temperature &gt; min &gt; celsius<\/li>\n\n\n\n<li>\u3000\u3000\u6700\u9ad8\u6c17\u6e29\uff1a\u25bcforecasts: &gt; \u25bc1 &gt; temperature &gt; max &gt; celsius <\/li>\n<\/ul>\n\n\n\n<p>\u6c17\u6e29\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u3000\u300025\u2103\u4ee5\u4e0a\uff1a<strong>\u8d64<\/strong><\/li>\n\n\n\n<li>\u3000\u300020\u2103\u4ee5\u4e0a\uff1a<strong>\u30aa\u30ec\u30f3\u30b8<\/strong><\/li>\n\n\n\n<li>\u3000\u300010\u2103\u4ee5\u4e0b\uff1a\u9752<\/li>\n\n\n\n<li>\u3000\u30005\u2103\u4ee5\u4e0b\uff1a<strong>\u767d<\/strong><\/li>\n\n\n\n<li>\u3000\u3000\u4e0a\u8a18\u4ee5\u5916\uff1a<strong>\u9ec4<\/strong><\/li>\n<\/ul>\n\n\n\n<p>\u3053\u3046\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u80cc\u666f\u3068\u6587\u5b57\u8272\u3082\u5927\u4e8b\u3067\u3059\u306d\u3002\u80cc\u666f\u306f\u9ed2\u3001\u65e5\u6642\u306f\u7dd1\u3001\u6587\u5b57\u8272\u306f\u9ec4\u8272\u3067\u3084\u3063\u3066\u307f\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<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<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u96fb\u5149\u63b2\u793a\u677f\u8868\u793a\u307e\u3067\u306e\u6d41\u308c<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u5b9f\u73fe\u3057\u307e\u3059\u3002 <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u624b\u9806\uff11\uff1apython\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u624b\u9806\uff12\uff1aimagemagick \u306e convert\u3092\u4f7f\u7528\u3057\u3066\u3001image \u30d5\u30a1\u30a4\u30eb\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u624b\u9806\uff13\uff1a\u4f5c\u6210\u3057\u305f image\u30d5\u30a1\u30a4\u30eb\u3092\u96fb\u5149\u63b2\u793a\u677f\u306b\u6d41\u3057\u307e\u3059\u3002 <\/li>\n<\/ul>\n\n\n\n<p>\u30c6\u30ed\u30c3\u30d7\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background\">4\u670810\u65e5\u300121\u664238\u520659\u79d2 \u795e\u5948\u5ddd\u770c \u6a2a\u6d5c \u306e\u5929\u6c17 \u4eca\u65e5\u306e\u5929\u6c17\u306f \u25a0 \u3067\u3059\u3002\u660e\u65e5\u306e\u5929\u6c17\u306f \u25bc \u3067\u3059\u3002\u660e\u65e5\u306e\u4e88\u60f3\u6700\u9ad8\u6c17\u6e29\u3001XX\u2103\u3001\u4e88\u60f3\u6700\u4f4e\u6c17\u6e29\u3001YY\u2103\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u80cc\u666f\u3000\u3000\u3000\u3000\u3000\u3000\u3000\uff1a\u6587\u5b57\u8272\u3000\u9ed2<\/strong><\/li>\n\n\n\n<li><strong>\u65e5\u6642\uff5e\u306e\u5929\u6c17\u3000\u3000\u3000\uff1a\u6587\u5b57\u8272\u3000\u7dd1<\/strong><\/li>\n\n\n\n<li><strong>\u4eca\u65e5\u306e\u5929\u6c17\u306f\uff5e\u3067\u3059\uff1a\u6587\u5b57\u8272\u3000\u9ec4<\/strong><\/li>\n\n\n\n<li><strong>\u25a0\u3001\u25bc\u3000\u3000\u3000\u3000\u3000\u3000\uff1a\u304a\u5929\u6c17\u30de\u30fc\u30af<\/strong><\/li>\n\n\n\n<li><strong>XX\u2103\u3001YY\u2103\u3000\u3000\u3000 \uff1a\u6c17\u6e29\u306b\u3088\u308b\u8272\u66ff\u3048\uff08\uff12\uff0e\u53c2\u7167\uff09<\/strong> <\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806\uff11\u306e\u8a73\u7d30<\/h3>\n\n\n\n<p>python\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u306e\u5f62\u5f0f\u306f\u3001\u304a\u5929\u6c17\u30de\u30fc\u30af\u306e\u95a2\u4fc2\u3067 <strong>gif<\/strong> \u3068\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30d5\u30a1\u30a4\u30eb\uff11\u3000\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u65e5\u6642\uff0b\u300c \u795e\u5948\u5ddd\u770c \u6a2a\u6d5c \u306e\u5929\u6c17 \u300d<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff12\u3000\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u4eca\u65e5\u306e\u5929\u6c17\u306f\u300d<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff13\u3000\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u672c\u65e5\u306e\u304a\u5929\u6c17\u30de\u30fc\u30af<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff14\u3000\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u3067\u3059\u3002\u660e\u65e5\u306e\u5929\u6c17\u306f\u300d<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff15\u3000\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u660e\u65e5\u306e\u304a\u5929\u6c17\u30de\u30fc\u30af<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff16\u3000\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u3067\u3059\u3002\u660e\u65e5\u306e\u4e88\u60f3\u6700\u9ad8\u6c17\u6e29\u3001\u300d<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff17\u3000\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u6700\u9ad8\u6c17\u6e29\uff0b\u2103\u300d\u3092\u8a72\u5f53\u306e\u6587\u5b57\u8272<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff18\u3000\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u3001\u4e88\u60f3\u6700\u4f4e\u6c17\u6e29\u3001\u300d<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb\uff19\u3000\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u6700\u4f4e\u6c17\u6e29\uff0b\u2103\u300d\u3092\u8a72\u5f53\u306e\u6587\u5b57\u8272<\/li>\n\n\n\n<li>\u30d5\u30a1\u30a4\u30eb10\u3000\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3000\u5185\u5bb9\uff1a\u300c\u3067\u3059\u3002\u300d <\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806\uff12\u306e\u8a73\u7d30<\/h3>\n\n\n\n<p>\u6b21\u306e\u4e8c\u3064\u306e\u4f5c\u696d\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u4f5c\u6210<\/strong><br>\u4f5c\u6210\u3057\u305f\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092 convert\u6587\u3092\u4f7f\u7528\u3057\u3066\u3001\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\u304a\u5929\u6c17\u30de\u30fc\u30af\u306f\u3001\u30b5\u30a4\u30ba\u304c\u5c11\u3057\u5927\u304d\u3044\u306e\u3067\u3001\u4ed6\u306e\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u69d8\u306e\u5927\u304d\u3055\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u63a5\u7d9a<\/strong><br>\u4f5c\u6210\u3057\u305f\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u624b\u9806\uff13\u306e\u8a73\u7d30<\/h3>\n\n\n\n<p>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0 image-scroller.py \u3092\u4f7f\u7528\u3057\u3066\u3001\u4f5c\u6210\u3055\u308c\u305f image\u30d5\u30a1\u30a4\u30eb\u3092\u96fb\u5149\u63b2\u793a\u677f\u306b\u6d41\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u52c9\u5f37\u306b\u306a\u3063\u305f\u3068\u3053\u308d<\/h2>\n\n\n\n<p>60\u723a\u306f\u3001\u6839\u3092\u8a70\u3081\u3066\u3084\u3089\u306a\u3044\u306e\u3067\u3001\u306a\u304b\u306a\u304b\u719f\u7df4\u8005\u306b\u306a\u308c\u307e\u305b\u3093\u304c\u3001python\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u52c9\u5f37\u306b\u306a\u3063\u305f\u90e8\u5206\u304c\u4e0b\u8a18\u306e\u56db\u70b9\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">python\u3067\u306e\u30d5\u30a1\u30a4\u30eb\u51fa\u529b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>f = open(name,&#39;w&#39;)\nf.write(naiyo)\nf.close()<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">python\u304b\u3089\u306e\u30b3\u30de\u30f3\u30c9\u767a\u884c<\/h3>\n\n\n\n<p>\u3044\u308d\u3044\u308d\u3084\u308a\u65b9\u304c\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u304c\u4e00\u756a\u7c21\u5358\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>cmd = &quot;convert -background black -fill %s -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:%s\u2103 \/home\/pi\/work\/%s.gif&quot; % (color,ondo , file)\n\ntry:\n    res = subprocess.call( cmd.strip().split(&quot; &quot;) )\n    except:\n    print(&quot;Error. test&quot;)<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">python\u3067\u306e\u578b\u5909\u63db<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>max_temp = temperature[&#39;max&#39;][&#39;celsius&#39;]\n \u203b\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001max_temp\u306f\u3001\u6587\u5b57\u5217\u3068\u306a\u308b<\/code><\/pre><\/div>\n\n\n\n<p>\u305d\u306e\u305f\u3081\u3001\u6c17\u6e29\u306e\u5224\u5b9a\u3067\u306f\u3001int\u578b\u3068\u3057\u3066\u6271\u3046\u3088\u3046\u306b\u3059\u308b<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>if int(max_temp) &gt;= 25:\n img_file_out(&quot;red&quot;, max_temp, &quot;file7&quot;)\u30fb\u30fb\u30fb<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u5f15\u6570\u3092\u4f7f\u7528\u3057\u3066\u95a2\u6570\u3092\u4f7f\u3046<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>def file_out(name,naiyo):\n    f = open(name,&#39;w&#39;)\n    f.write(naiyo)\n\u547c\u3073\u51fa\u3057\u5074\nfile8_text = &#39;\u3001\u4e88\u60f3\u6700\u4f4e\u6c17\u6e29 &#39;\nfile_out(&quot;\/home\/pi\/work\/file8.txt&quot;,file8_text)<\/code><\/pre><\/div>\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<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u8868\u793a\u7d50\u679c<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"new tenki\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/Z9reKKEnXTo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u5f53\u521d\u306e\u3082\u306e\u3088\u308a\u3001\u30a4\u30f3\u30d1\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u304b\u306d\u3002\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u30bd\u30fc\u30b9\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u30b7\u30a7\u30eb<\/h2>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001\u30bd\u30fc\u30b9\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u30b7\u30a7\u30eb\u3092\u8f09\u305b\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30bd\u30fc\u30b9\u30d7\u30ed\u30b0\u30e9\u30e0<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>#!\/usr\/bin\/env python3 \n# -*- coding:utf-8 -*- \n\nfrom datetime import datetime\n\nimport urllib.request \nimport json \n\nimport subprocess \n\ndef main(): \n    print (&#39;start&#39;) \n    txt_weather() \n    return\n\ndef file_out(name,naiyo):\n\n    f = open(name,&#39;w&#39;) \n    f.write(naiyo) \n    f.close() \n\n    return\n\ndef img_file_out(color, ondo, file): \n\n    print(color,ondo,file) \n\n    cmd = &quot;convert -background black -fill %s -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:%s\u2103 \/home\/pi\/work\/%s.gif&quot; % (color, ondo , file) \n\n    try: \n        res = subprocess.call( cmd.strip().split(&quot; &quot;) ) \n\n    except: \n        print(&quot;Error. test&quot;) \n\n    return\n\ndef txt_weather(): \n    city = &#39;140010&#39;; # Yokohama \n    print (city) \n    json_url = &#39;https:\/\/weather.livedoor.com\/forecast\/webservice\/json\/v1&#39; \n#API URL \n\n    weather_text = u&#39;%s\u306e\u5929\u6c17\u306f&#39; \n    temperature_text = u&#39;\u3067\u3059\u3002%s\u306e\u4e88\u60f3\u6700\u9ad8\u6c17\u6e29\u3001%s\u2103\u3001\u4e88\u60f3\u6700\u4f4e\u6c17\u6e29\u3001%s\u2103\u3067\u3059\u3002&#39;\n    file6_text = &#39;\u3067\u3059\u3002\u660e\u65e5\u306e\u4e88\u60f3\u6700\u9ad8\u6c17\u6e29 &#39; \n    file8_text = &#39;\u3001\u4e88\u60f3\u6700\u4f4e\u6c17\u6e29 &#39; \n    file10_text = &#39;\u3067\u3059\u3002&#39;\n\n    try:\n        r = urllib.request.urlopen(&#39;%s?city=%s&#39; % (json_url, city) ) \n        obj = json.loads( r.read().decode(&#39;utf-8&#39;) ) \n\n        title = obj[&#39;title&#39;] \n        forecasts = obj[&#39;forecasts&#39;] \n\n        d = datetime.now() \n        text_day = &#39;%s\u6708%s\u65e5\u3001%s\u6642%s\u5206%s\u79d2&#39; % (d.month, d.day, d.hour, d.minute, d.second) \n        # TODAY \n        cast = forecasts[0] \n        image = cast[&#39;image&#39;] \n        today_w_txt = weather_text % (cast[&#39;dateLabel&#39;]) \n\n        today_w_url = image[&#39;url&#39;] \n        today_name = &quot;\/home\/pi\/work\/file3.gif&quot; \n        urllib.request.urlretrieve(today_w_url, today_name) \n\n        # TOMMOROW \n        cast = forecasts[1] \n        temperature = cast[&#39;temperature&#39;] \n        image = cast[&#39;image&#39;] \n        tommorow_w_txt = weather_text % (cast[&#39;dateLabel&#39;]) \n        tommorow_w_gif = urllib.request.urlopen(image[&#39;url&#39;]) \n\n        tommorow_w_url = image[&#39;url&#39;] \n        tommorow_name = &quot;\/home\/pi\/work\/file5.gif&quot; \n\n        urllib.request.urlretrieve(tommorow_w_url, tommorow_name) \n\n        max_temp = temperature[&#39;max&#39;][&#39;celsius&#39;] \n        min_temp = temperature[&#39;min&#39;][&#39;celsius&#39;] \n\n        # text_file set & out \n        file1_text = text_day + &#39; &#39; + title + &#39; &#39; \n        file2_text = today_w_txt + &#39; &#39; \n        file4_text = file10_text + tommorow_w_txt + &#39; &#39; \n\n        file_out(&quot;\/home\/pi\/work\/file1.txt&quot;,file1_text) \n        file_out(&quot;\/home\/pi\/work\/file2.txt&quot;,file2_text) \n        file_out(&quot;\/home\/pi\/work\/file4.txt&quot;,file4_text) \n        file_out(&quot;\/home\/pi\/work\/file6.txt&quot;,file6_text) \n        file_out(&quot;\/home\/pi\/work\/file8.txt&quot;,file8_text) \n        file_out(&quot;\/home\/pi\/work\/file10.txt&quot;,file10_text) \n\n        # max temp file7 \n        if int(max_temp) &gt;= 25: \n            img_file_out(&quot;red&quot;, max_temp, &quot;file7&quot;) \n        elif int(max_temp) &gt;= 20: \n            img_file_out(&quot;orange&quot;, max_temp, &quot;file7&quot;) \n        else: \n            img_file_out(&quot;yellow&quot;, max_temp, &quot;file7&quot;) \n\n        # mix temp file9\n        if int(min_temp) &lt; 5:\n            img_file_out(&quot;white&quot;, min_temp, &quot;file9&quot;)\n        elif int(min_temp) &lt; 10:\n            img_file_out(&quot;blue&quot;, min_temp, &quot;file9&quot;)\n        else:\n            img_file_out(&quot;yellow&quot;, min_temp, &quot;file9&quot;)\n\n   finally:\n       r.close()\n\n   return\n\n### Execute\nif __name__ == &quot;__main__&quot;:\n main()<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b7\u30a7\u30eb<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code># file product \npython3 \/home\/pi\/python-pg\/tenki_file.py \n\n# text --&gt; gif \nconvert -background black -fill green -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:@\/home\/pi\/work\/file1.txt \/home\/pi\/work\/file1.gif\nconvert -background black -fill yellow -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:@\/home\/pi\/work\/file2.txt \/home\/pi\/work\/file2.gif \nconvert -background black -fill yellow -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:@\/home\/pi\/work\/file4.txt \/home\/pi\/work\/file4.gif \nconvert -background black -fill yellow -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:@\/home\/pi\/work\/file6.txt \/home\/pi\/work\/file6.gif \nconvert -background black -fill yellow -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:@\/home\/pi\/work\/file8.txt \/home\/pi\/work\/file8.gif \nconvert -background black -fill yellow -font \/usr\/share\/fonts\/truetype\/fonts-japanese-gothic.ttf -pointsize 16 label:@\/home\/pi\/work\/file10.txt \/home\/pi\/work\/file10.gif \necho &quot;convert end&quot; \n# gif1 add border \nconvert -border 1x1 -bordercolor red \/home\/pi\/work\/file1.gif \/home\/pi\/work\/file1_border.gif \necho &quot;add border end&quot; \n\n# gif --&gt; size change \nconvert \/home\/pi\/work\/file1_border.gif -resize x16 \/home\/pi\/work\/file1_border1.gif \nconvert \/home\/pi\/work\/file3.gif -resize x16 \/home\/pi\/work\/file3_2.gif \nconvert \/home\/pi\/work\/file5.gif -resize x16 \/home\/pi\/work\/file5_2.gif \n\necho &quot;size change end&quot;\n# file\u3000add \nconvert +append \/home\/pi\/work\/file1_border1.gif \/home\/pi\/work\/file2.gif \/home\/pi\/work\/file3_2.gif \/home\/pi\/work\/file4.gif \/home\/pi\/work\/file5_2.gif \/home\/pi\/work\/file6.gif \/home\/pi\/work\/file7.gif \/home\/pi\/work\/file8.gif \/home\/pi\/work\/file9.gif \/home\/pi\/work\/file10.gif \/home\/pi\/work\/tenki.gif\n\n# imagescroller \n#\/home\/pi\/rpi-rgb-led-matrix\/bindings\/python\/samples\/stopafter 10 sudo python3 \/home\/pi\/rpi-rgb-led-matrix\/bindings\/python\/samples\/image-scroller.py -r 16 --led-no-hardware-pulse yes -c 2 --led-slowdown-gpio 0 -i \/home\/pi\/work\/tenki.gif \n\/home\/pi\/rpi-rgb-led-matrix\/bindings\/python\/samples\/stopafter 60 sudo python3 \/home\/pi\/rpi-rgb-led-matrix\/bindings\/python\/samples\/image-scroller.py -r 16 --led-no-hardware-pulse yes -c 2 -i \/home\/pi\/work\/tenki.gif \n\n#demo run for LED PANEL reset \nsudo \/home\/pi\/rpi-rgb-led-matrix\/examples-api-use\/demo -D 1 -t 5 \/home\/pi\/rpi-rgb-led-matrix\/examples-api-use\/runtext16.ppm --led-rows=16 --led-no-hardware-pulse --led-chain=2<\/code><\/pre><\/div>\n\n\n\n<p>\u203b\u6700\u5f8c\u306eLED PANEL reset\u306f\u3001\u76f4\u524d\u306eimagescroller\u304c\u6b62\u307e\u3063\u305f\u6bb5\u968e\u3067\u3001\u96fb\u5149\u63b2\u793a\u677f\u306b\u4e0d\u8981\u306a\u5f62\u3067\u6b8b\u3063\u3066\u3057\u307e\u3046\u3082\u306e\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\u305f\u3081\u3001Hello World\u3092\u6d41\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u203b\u300c\u96fb\u5149\u63b2\u793a\u677f\u300d\u306e\u4e00\u3064\u524d\u3068\u6b21\u306e\u8a18\u4e8b\u3092\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u3002<\/strong><br>\u21d2 previous\uff1a<strong><a href=\"https:\/\/www.mizutan.com\/wordpress\/?p=3632\" target=\"_blank\" rel=\"noreferrer noopener\">\u30e9\u30ba\u30d1\u30a4\u3067\u96fb\u5149\u63b2\u793a\u677fpart10\uff01\u74b0\u5883\u8a2d\u5b9a\u3067\u5927\u82e6\u6226\u306b\u9665\u308b\u3082\u4f55\u3068\u304b\u518d\u751f<\/a><\/strong><br>\u21d2 next\uff1a<strong><a href=\"https:\/\/www.mizutan.com\/wordpress\/?p=9481\" target=\"_blank\" rel=\"noreferrer noopener\">\u30e9\u30ba\u30d1\u30a4\u96fb\u5149\u63b2\u793a\u677f\u7528\u306eOS\u3092Jessie\u304b\u3089stretch\u306b\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u305f<\/a><\/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<!-- 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>\u4eca\u56de\u306f\u3001\u5929\u6c17\u4e88\u5831\u306e\u8868\u793a\u3092\u3044\u3058\u304f\u3063\u3066\u307f\u307e\u3057\u305f\u3002<br><br>\u96fb\u5149\u63b2\u793a\u677f\u306b\u8868\u793a\u3057\u3066\u3044\u308b\u5929\u6c17\u4e88\u5831\u306f\u3059\u3079\u3066\u65e5\u672c\u8a9e\u3067\u3057\u305f\u304c\u3001\u6bce\u56de\u8868\u793a\u3055\u308c\u308b\u30e2\u30ce\u306a\u306e\u3067\u3001\u3044\u304f\u3064\u304b\u5909\u5316\u304c\u6b32\u3057\u304f\u306a\u3063\u3066\u304d\u305f\u3093\u3067\u3059\u3002<br><br>\u305d\u3053\u3067\u3001\u30c6\u30ec\u30d3\u306e\u5929\u6c17\u4e88\u5831\u306a\u3069\u3067\u306a\u3055\u308c\u308b\u3001\u304a\u5929\u6c17\u30de\u30fc\u30af\u3092\u96fb\u5149\u63b2\u793a\u677f\u3067\u51fa\u3059\u3088\u3046\u5bfe\u7b56\u3057\u307e\u3057\u305f\u3002<br><br>\u5408\u308f\u305b\u3066\u6c17\u6e29\u3082\u3001\u6e29\u5ea6\u306b\u3088\u3063\u3066\u8272\u3092\u5909\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<br><br>\u305d\u3053\u305d\u3053\u3001\u3046\u307e\u304f\u884c\u3063\u305f\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u203b\u6c17\u3065\u3051\u3070\u96fb\u5149\u63b2\u793a\u677f\u306e\u8a18\u4e8b\u3082\u5897\u3048\u3066\u304d\u307e\u3057\u305f<\/p>\n\n\n\n<div class=\"blogcard\"><a href=\"https:\/\/www.mizutan.com\/wordpress\/?cat=261\" data-blogcard=\"1\">\u96fb\u5149\u63b2\u793a\u677f<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u3001\u5929\u6c17\u4e88\u5831\u306e\u8868\u793a\u3092\u3044\u3058\u304f\u3063\u3066\u307f\u3088\u3046\u304b\u3068\u8003\u3048\u307e\u3059\u3002 \u73fe\u5728\u3001\u96fb\u5149\u63b2\u793a\u677f\u306b\u8868\u793a\u3057\u3066\u3044\u308b\u5929\u6c17\u4e88\u5831\u306f\u3059\u3079\u3066\u65e5\u672c\u8a9e\u3067\u3059\u3002 \u307e\u3042\u3001\u305d\u308c\u3067\u3082\u5b9f\u7528\u306b\u306f\u4f55\u306e\u652f\u969c\u3082\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u307e\u3042\u3001\u6bce\u56de\u8868\u793a\u3055\u308c\u308b\u30e2\u30ce\u306a\u306e\u3067\u3001\u3044\u304f\u3064\u304b\u5909\u5316\u304c\u6b32\u3057\u304f\u306a\u3063\u3066 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4004,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[261],"tags":[],"class_list":["post-3770","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electric-bulletin-board"],"_links":{"self":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3770","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=3770"}],"version-history":[{"count":16,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3770\/revisions"}],"predecessor-version":[{"id":29997,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3770\/revisions\/29997"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/4004"}],"wp:attachment":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}