{"id":3527,"date":"2020-07-09T10:35:31","date_gmt":"2020-07-09T01:35:31","guid":{"rendered":"https:\/\/taki-lab.site\/bocci\/?p=3527"},"modified":"2020-07-09T10:35:38","modified_gmt":"2020-07-09T01:35:38","slug":"%e3%80%90%e3%83%a9%e3%82%ba%e3%83%91%e3%82%a4%e3%80%91%e3%81%93%e3%82%8c%e3%81%be%e3%81%a7%e3%82%84%e3%81%a3%e3%81%a6%e3%81%8d%e3%81%9f%e3%81%93%e3%81%a8%e3%82%92%e7%b5%84%e3%81%bf%e5%90%88%e3%82%8f","status":"publish","type":"post","link":"https:\/\/taki-lab.site\/bocci\/?p=3527","title":{"rendered":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3053\u308c\u307e\u3067\u3084\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3002"},"content":{"rendered":"\n<p>\u3053\u3053\u307e\u3067\u3084\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u5168\u3066\u7d44\u307f\u5408\u308f\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<p>GLCD\u306b\u8868\u793a\u3059\u308b\u306e\u306f\u3001<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6642\u523b\u3001\u5929\u6c17\u3001\u6e29\u5ea6\u3001\u6e7f\u5ea6<\/li><li>\u30ab\u30ec\u30f3\u30c0\u30fc<\/li><li>\u5009\u7530\u307e\u3057\u308d\u306e\u7d75<\/li><\/ul>\n\n\n\n<p>\u3053\u306e3\u3064\u306e\u8868\u793a\u3092\u3001\u30b9\u30a4\u30c3\u30c1\u306e1\u756a\u3092\u62bc\u3059\u3053\u3068\u3067\u5207\u308a\u66ff\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import RPi.GPIO as GPIO\nimport time\nimport datetime\nimport calendar\nimport GLCD\nimport AM2320\nimport Weather\nimport SW\n\n\ndef __main__():\n    GPIO.setmode(GPIO.BCM)\n    GLCD.PinsInit(20, 7, 8, 9, 18, 19, 10, 11, 12, 13, 14, 15, 16, 17)\n    GLCD.GLCDInit()\n    GLCD.GLCDDisplayClear()\n\n    SW.PinsInit(21, 22, 23, 24, 25, 26, 27)\n    SW.Start()\n\n    roop = 10 * 60 * 60\n    mode = 1\n    try:\n        while True:\n            key = SW.GetKey()\n            if key == \"1\":\n                GLCD.GLCDDisplayClear()\n                mode += 1\n                if mode > 3:\n                    mode = 1\n\n            if mode == 1:\n                if roop >= 10 * 60 * 60:\n                    Weather.RequestAPI()\n                    weather = Weather.GetWeather()\n                    temp = Weather.GetTemp()\n                    roop = 0\n\n                GLCD.GLCDPuts(1, 0, \"Date :\")\n                GLCD.GLCDPuts(5, 8, datetime.datetime.now().strftime('%Y:%m:%d %A'))\n                GLCD.GLCDPuts(1, 16, \"Weather :\")\n                GLCD.GLCDPuts(10,24, weather)\n                GLCD.GLCDPuts(10,32, \"Temp : \" + format(temp) + 'C')\n                GLCD.GLCDPuts(1, 40, \"Time : \" + datetime.datetime.now().strftime('%H:%M:%S'))\n                GLCD.GLCDPuts(1, 48, \"Humidity    : \" + AM2320.GetHum() + '%')\n                GLCD.GLCDPuts(1, 56, \"Temperature : \" + AM2320.GetTemp() + 'C')\n\n                roop += 1\n            elif mode == 2:\n                cal = calendar.month(datetime.datetime.now().year, datetime.datetime.now().month)\n                cals = cal.split(\"\\n\")\n                y = 0\n                for c in cals:\n                    GLCD.GLCDPuts(1, y, c)\n                    y += 8\n            \n            elif mode == 3:\n                GLCD.drowMashiro()\n\n            time.sleep(0.1)\n    except KeyboardInterrupt:\n        SW.Stop()\n        GLCD.GLCDDisplayClear()\n        GPIO.cleanup()\n\n__main__()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"474\" height=\"267\" src=\"https:\/\/www.youtube.com\/embed\/GvWc3-F3KLI?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=ja&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<p>\u30b9\u30a4\u30c3\u30c1\u62bc\u4e0b\u3067mode\u306e\u5024\u304c\u5909\u5316\u3057\u3001\u8868\u793a\u51e6\u7406\u306e\u5185\u5bb9\u3092\u5909\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u306a\u304b\u306a\u304b\u4e0a\u624b\u304f\u3044\u3063\u305f\u306e\u3067\u3001\u3053\u308c\u3067\u5b8c\u6210\u54c1\u3092\u4f5c\u3063\u3066\u307f\u3088\u3046\u304b\u3002<\/p>\n\n\n\n<p>\u30e9\u30ba\u30d1\u30a4\u904a\u3073\u306e\u96c6\u5927\u6210\u3067\u3059\u3002<\/p>\n\n\n\n<a href=\"\/\/blog.with2.net\/link\/?2023426:1010\" target=\"_blank\" rel=\"noopener noreferrer\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2019\/12\/03a6eee54039f74ded0b8f7548b1868f.png?w=474\" title=\"\u30d1\u30bd\u30b3\u30f3\u30e9\u30f3\u30ad\u30f3\u30b0\"><\/a>\n\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3053\u307e\u3067\u3084\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u5168\u3066\u7d44\u307f\u5408\u308f\u305b\u307e\u3059\u3002 GLCD\u306b\u8868\u793a\u3059\u308b\u306e\u306f\u3001 \u6642\u523b\u3001\u5929\u6c17\u3001\u6e29\u5ea6\u3001\u6e7f\u5ea6 \u30ab\u30ec\u30f3\u30c0\u30fc \u5009\u7530\u307e\u3057\u308d\u306e\u7d75 \u3053\u306e3\u3064\u306e\u8868\u793a\u3092\u3001\u30b9\u30a4\u30c3\u30c1\u306e1\u756a\u3092\u62bc\u3059\u3053\u3068\u3067\u5207\u308a\u66ff\u3048\u307e\u3059\u3002 \u30b9\u30a4\u30c3\u30c1\u62bc\u4e0b\u3067mode\u306e\u5024\u304c\u5909\u5316\u3057\u3001 &hellip; <a href=\"https:\/\/taki-lab.site\/bocci\/?p=3527\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3053\u308c\u307e\u3067\u3084\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3002<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3053\u308c\u307e\u3067\u3084\u3063\u3066\u304d\u305f\u3053\u3068\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3002\n#TechCommit\n","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[187,3],"tags":[188],"class_list":["post-3527","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi","category-3","tag-188"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8SDbY-UT","jetpack-related-posts":[{"id":3620,"url":"https:\/\/taki-lab.site\/bocci\/?p=3620","url_meta":{"origin":3527,"position":0},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b9\u30a4\u30c3\u30c1\u64cd\u4f5c\u3092\u5272\u308a\u8fbc\u307f\u3067\u884c\u3046\u3002","author":"taki","date":"2020\u5e747\u670818\u65e5","format":false,"excerpt":"\u6700\u65b0\u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089\u3002 https:\/\/github.com\/takishita2nd\/RaspiDi\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/IMG_20200718_073112-scaled.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/IMG_20200718_073112-scaled.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/IMG_20200718_073112-scaled.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/IMG_20200718_073112-scaled.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/IMG_20200718_073112-scaled.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/IMG_20200718_073112-scaled.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":3373,"url":"https:\/\/taki-lab.site\/bocci\/?p=3373","url_meta":{"origin":3527,"position":1},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011GLCD\u306b\u6642\u523b\u30fb\u6c17\u6e29\u30fb\u6e7f\u5ea6\u30fb\u5929\u5019\u60c5\u5831\u3092\u8868\u793a\u3059\u308b","author":"taki","date":"2020\u5e746\u670825\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u3084\u3063\u3066\u3044\u305fGLCD\u3092\u30e9\u30a4\u30d6\u30e9\u30ea\u5316\u3057\u3066\u3001gitHub\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 https:\/\/gith\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3807,"url":"https:\/\/taki-lab.site\/bocci\/?p=3807","url_meta":{"origin":3527,"position":2},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u3044\u308d\u3044\u308d\u8a08\u6e2c\u30e2\u30cb\u30bf\u30fc\u3011HTTP\u30b5\u30fc\u30d0\u3092\u5b9f\u88c5\u3059\u308b","author":"taki","date":"2020\u5e748\u67085\u65e5","format":false,"excerpt":"\u6e2c\u5b9a\u3057\u305f\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3092Windows\u5074\u3067\u8868\u793a\u3055\u305b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u524d\u56deHAT\u3067\u3084\u3063\u305f\u3068\u304d\u306f\u30e9\u30ba\u30d1\u30a4\u5074\u3092\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/eecbeac11e65259e24fe97f1a4e08d0d.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/eecbeac11e65259e24fe97f1a4e08d0d.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/08\/eecbeac11e65259e24fe97f1a4e08d0d.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3519,"url":"https:\/\/taki-lab.site\/bocci\/?p=3519","url_meta":{"origin":3527,"position":3},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010GLCD\u3011\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u8868\u793a\u3059\u308b","author":"taki","date":"2020\u5e747\u67089\u65e5","format":false,"excerpt":"GLCD\u306b\u30ab\u30ec\u30f3\u30c0\u30fc\u3092\u8868\u793a\u3055\u305b\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 import RPi.GPIO as GPIO im\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/MVIMG_20200708_092547-scaled.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/MVIMG_20200708_092547-scaled.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/MVIMG_20200708_092547-scaled.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/MVIMG_20200708_092547-scaled.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/MVIMG_20200708_092547-scaled.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/07\/MVIMG_20200708_092547-scaled.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":3810,"url":"https:\/\/taki-lab.site\/bocci\/?p=3810","url_meta":{"origin":3527,"position":4},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u3044\u308d\u3044\u308d\u8a08\u6e2c\u30e2\u30cb\u30bf\u30fc\u3011HTTP\u30b5\u30fc\u30d0\u3092\u5b9f\u88c5\u3059\u308b(\u4fee\u6b63)","author":"taki","date":"2020\u5e748\u67086\u65e5","format":false,"excerpt":"\u3059\u3044\u307e\u305b\u3093\u3001 https:\/\/taki-lab.site\/bocci\/?p=3807 \u6628\u65e5\u306e\u3053\u308c\u3001\u4fee\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4284,"url":"https:\/\/taki-lab.site\/bocci\/?p=4284","url_meta":{"origin":3527,"position":5},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u3010\u30ab\u30e1\u30e9\u3011\u30d7\u30ec\u30d3\u30e5\u30fc\u753b\u9762\u3092\u30e9\u30ba\u30d1\u30a4\u304b\u3089\u53d6\u5f97\u30fb\u8868\u793a","author":"taki","date":"2020\u5e7410\u67088\u65e5","format":false,"excerpt":"https:\/\/taki-lab.site\/bocci\/?p=4223 \u524d\u56de\u306f\u3001Web\u30da\u30fc\u30b8\u3092\u30ed\u30fc\u30ab\u2026","rel":"","context":"Raspberry Pi","block_context":{"text":"Raspberry Pi","link":"https:\/\/taki-lab.site\/bocci\/?cat=187"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/10\/f47d4a87b363eb18d947d09176fed1ff.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/10\/f47d4a87b363eb18d947d09176fed1ff.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/10\/f47d4a87b363eb18d947d09176fed1ff.jpg?resize=525%2C300 1.5x"},"classes":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/3527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3527"}],"version-history":[{"count":2,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/3527\/revisions"}],"predecessor-version":[{"id":3543,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/3527\/revisions\/3543"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}