{"id":2845,"date":"2020-05-05T11:33:02","date_gmt":"2020-05-05T02:33:02","guid":{"rendered":"http:\/\/taki-lab.site\/bocci\/?p=2845"},"modified":"2020-05-05T11:33:04","modified_gmt":"2020-05-05T02:33:04","slug":"%e3%80%90%e3%83%a9%e3%82%ba%e3%83%91%e3%82%a4%e3%80%91%e3%82%b8%e3%83%a3%e3%82%a4%e3%83%ad%e3%82%bb%e3%83%b3%e3%82%b5%e3%83%bc%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b%e3%80%80%e3%81%9d-2","status":"publish","type":"post","link":"https:\/\/taki-lab.site\/bocci\/?p=2845","title":{"rendered":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3063\u3066\u307f\u308b\u3000\u305d\u306e2"},"content":{"rendered":"\n<p>\u305d\u306e1\u306f\u3053\u3061\u3089<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-\u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"SoTQkL9EvF\"><a href=\"https:\/\/taki-lab.site\/bocci\/?p=2834\">\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3063\u3066\u307f\u308b\u3000\u305d\u306e1<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3063\u3066\u307f\u308b\u3000\u305d\u306e1&#8221; &#8212; \u81ea\u5206\u3001\u307c\u3063\u3061\u3067\u3059\u304c\u4f55\u304b\uff1f\" src=\"https:\/\/taki-lab.site\/bocci\/?p=2834&#038;embed=true#?secret=7A9LAvNKE1#?secret=SoTQkL9EvF\" data-secret=\"SoTQkL9EvF\" width=\"474\" height=\"267\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>\u3068\u3044\u3046\u304b\u3001print()\u3067\u51fa\u529b\u3055\u305b\u3066\u3082\u826f\u304f\u898b\u3048\u306a\u3044\u306e\u3067\u3001TK\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u8868\u793a\u3055\u305b\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from tkinter import *\nfrom tkinter import ttk\nfrom sense_hat import SenseHat\nimport threading\n\nsense = SenseHat()\n\nroot = Tk()\nframe1 = ttk.Frame(root)\nframe1.grid()\n\nlabel1 = ttk.Label(frame1, text='pitch', width=10)\nlabel1.grid(row=1, column=1)\n\nlabel_pitch = ttk.Label(frame1, width=10)\nlabel_pitch.grid(row=1, column=2)\n\nlabel2 = ttk.Label(frame1, text='yaw', width=10)\nlabel2.grid(row=1, column=3)\n\nlabel_yaw = ttk.Label(frame1, width=10)\nlabel_yaw.grid(row=1, column=4)\n\nlabel3 = ttk.Label(frame1, text='roll', width=10)\nlabel3.grid(row=1, column=5)\n\nlabel_roll = ttk.Label(frame1, width=10)\nlabel_roll.grid(row=1, column=6)\n\ndef scheduler():\n    t = threading.Timer(0.1, scheduler)\n    t.start()\n    orientation_data = sense.get_orientation()\n    label_pitch.configure(text=f'{orientation_data&#91;\"pitch\"]:.4f}')\n    label_yaw.configure(text=f'{orientation_data&#91;\"yaw\"]:.4f}')\n    label_roll.configure(text=f'{orientation_data&#91;\"roll\"]:.4f}')\n\nt = threading.Thread(target = scheduler)\nt.start()\n\nroot.mainloop()\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\/MFHh48aU2so?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><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u305d\u306e1\u306f\u3053\u3061\u3089 \u3068\u3044\u3046\u304b\u3001print()\u3067\u51fa\u529b\u3055\u305b\u3066\u3082\u826f\u304f\u898b\u3048\u306a\u3044\u306e\u3067\u3001TK\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u8868\u793a\u3055\u305b\u3066\u307f\u307e\u3057\u305f\u3002<\/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_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":"","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},"jetpack_post_was_ever_published":false},"categories":[187,3],"tags":[188],"class_list":["post-2845","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-JT","jetpack-related-posts":[{"id":2818,"url":"https:\/\/taki-lab.site\/bocci\/?p=2818","url_meta":{"origin":2845,"position":0},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u3044\u308d\u3044\u308d\u8868\u793a\u3055\u305b\u3066\u307f\u308b","author":"taki","date":"2020\u5e745\u67083\u65e5","format":false,"excerpt":"\u3053\u3061\u3089\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5165\u529b\u3057\u307e\u3059\u3002 https:\/\/github.com\/raspberryp\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\/05\/MVIMG_20200501_092912.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/MVIMG_20200501_092912.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/MVIMG_20200501_092912.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/MVIMG_20200501_092912.jpg?resize=700%2C400 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/MVIMG_20200501_092912.jpg?resize=1050%2C600 3x"},"classes":[]},{"id":2834,"url":"https:\/\/taki-lab.site\/bocci\/?p=2834","url_meta":{"origin":2845,"position":1},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b8\u30e3\u30a4\u30ed\u30bb\u30f3\u30b5\u30fc\u3092\u4f7f\u3063\u3066\u307f\u308b\u3000\u305d\u306e1","author":"taki","date":"2020\u5e745\u67084\u65e5","format":false,"excerpt":"\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u53c2\u8003\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4e0e\u3048\u3066\u307f\u307e\u3059\u3002 https:\/\/github.com\/raspber\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\/05\/0fb9938fe9e1031ba740867587e1b87f.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/0fb9938fe9e1031ba740867587e1b87f.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/0fb9938fe9e1031ba740867587e1b87f.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/0fb9938fe9e1031ba740867587e1b87f.jpg?resize=700%2C400 2x"},"classes":[]},{"id":2864,"url":"https:\/\/taki-lab.site\/bocci\/?p=2864","url_meta":{"origin":2845,"position":2},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011LED\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3067\u6e29\u5ea6\u3092\u8868\u793a\u3059\u308b","author":"taki","date":"2020\u5e745\u67087\u65e5","format":false,"excerpt":"\u3069\u3046\u305b\u306a\u3089LED\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3092\u5229\u7528\u3057\u305f\u3044\u306e\u3067\u3001LED\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3067\u6e29\u5ea6\u3092\u8868\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u30a4\u30e1\u30fc\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\/img.youtube.com\/vi\/dnFNEy3pepk\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2906,"url":"https:\/\/taki-lab.site\/bocci\/?p=2906","url_meta":{"origin":2845,"position":3},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u30bb\u30f3\u30b5\u30fc\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3059\u308b\u3002","author":"taki","date":"2020\u5e745\u670810\u65e5","format":false,"excerpt":"\u524d\u56de\u307e\u3067\u306e\u72b6\u6cc1\u306f\u3053\u3061\u3089\u3002 https:\/\/taki-lab.site\/bocci\/?p=2896 \u4eca\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\/05\/39f39e098ef0038af6d1a2b8d092a64d.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2801,"url":"https:\/\/taki-lab.site\/bocci\/?p=2801","url_meta":{"origin":2845,"position":4},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3002","author":"taki","date":"2020\u5e745\u67082\u65e5","format":false,"excerpt":"\u3053\u3061\u3089\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5165\u529b\u3057\u307e\u3059\u3002 https:\/\/github.com\/raspberryp\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\/05\/VID_20200430_112515_Moment.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/VID_20200430_112515_Moment.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/VID_20200430_112515_Moment.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/VID_20200430_112515_Moment.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/VID_20200430_112515_Moment.jpg?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/taki-lab.site\/bocci\/wp-content\/uploads\/2020\/05\/VID_20200430_112515_Moment.jpg?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":2873,"url":"https:\/\/taki-lab.site\/bocci\/?p=2873","url_meta":{"origin":2845,"position":5},"title":"\u3010\u30e9\u30ba\u30d1\u30a4\u3011\u30b8\u30e7\u30a4\u30b9\u30c6\u30a3\u30c3\u30af\u3092\u4f7f\u3063\u3066\u307f\u308b\u3002","author":"taki","date":"2020\u5e745\u67088\u65e5","format":false,"excerpt":"\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u3044\u307e\u3059\u3002 https:\/\/github.com\/raspberrypilea\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\/img.youtube.com\/vi\/Jxcaq7GADV0\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2845","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=2845"}],"version-history":[{"count":1,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2845\/revisions"}],"predecessor-version":[{"id":2846,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=\/wp\/v2\/posts\/2845\/revisions\/2846"}],"wp:attachment":[{"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/taki-lab.site\/bocci\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}