{"id":5359,"date":"2018-11-21T09:00:48","date_gmt":"2018-11-21T00:00:48","guid":{"rendered":"http:\/\/www.mizutan.com\/wordpress\/?p=5359"},"modified":"2024-12-22T10:10:40","modified_gmt":"2024-12-22T01:10:40","slug":"post-5359","status":"publish","type":"post","link":"https:\/\/www.mizutan.com\/wordpress\/?p=5359","title":{"rendered":"\u6163\u6027\u8a08\u6e2c\u30e6\u30cb\u30c3\u30c8\u3092\u4f7f\u3063\u3066sense hat\u306e\u52d5\u4f5c\u306e\u691c\u51fa\u3092\u3057\u3066\u307f\u305f"},"content":{"rendered":"\n<p>\u975e\u5e38\u306b\u4e45\u65b9\u3076\u308a\u306e Sense Hat \u306e part6 \u3067\u3059\u3002\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u5f93\u3044\u3001IMU\u3092\u89e6\u3063\u3066\u307f\u307e\u3057\u305f\u3002<br><br>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u300cDetecting movement\u300d\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u8aac\u660e\u304c\u51fa\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background\">Sense HAT\u306b\u306f\u3001\u52d5\u4f5c\u3092\u691c\u51fa\u3059\u308b\u4e00\u9023\u306e\u30bb\u30f3\u30b5\u30fc\u3092\u542b\u3080\uff29\uff2d\uff35\uff08\u6163\u6027\u8a08\u6e2c\u30e6\u30cb\u30c3\u30c8\uff09\u30c1\u30c3 \u30d7\u304c\u3042\u308a\u307e\u3059\u3002\u5b9f\u969b\u306b\u306f3\u3064\u306e\u30bb\u30f3\u30b5\u30fc\u304c1\u3064\u306b\u306a\u3063\u3066\u3044\u307e\u3059<br><strong>\u30b8\u30e3\u30a4\u30ed\u30b9\u30b3\u30fc\u30d7<\/strong>\uff1a\u904b\u52d5\u91cf\u3068\u56de\u8ee2\u3092\u6e2c\u5b9a\u3057\u3066\u30dc\u30fc\u30c9\u304c\u3069\u306e\u65b9\u5411\u306b\u3042\u308b\u304b\u3092\u691c\u51fa\u3057\u307e\u3059<br><strong>\u52a0\u901f\u5ea6\u8a08<\/strong>\uff1a\u52a0\u901f\u529b\u3092\u6e2c\u5b9a\u3057\u3001\u91cd\u529b\u306e\u65b9\u5411\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<br><strong>\u78c1\u529b\u8a08<\/strong>\uff1a\u5730\u7403\u306e\u78c1\u5834\u3092\u6e2c\u5b9a\u3057\u307e\u3059\u3002\u30b3\u30f3\u30d1\u30b9\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059<\/p>\n\n\n\n<p>\u305d\u3057\u3066\u3001\u3053\u308c\u3089\u306e\u30bb\u30f3\u30b5\u30fc\u304c\u4f55\u6545\u91cd\u8981\u306a\u306e\u304b\u3092\u8aac\u660e\u3057\u305f\u6587\u7ae0\u304c\u8f09\u3063\u3066\u3044\u307e\u3059\u3002<br><br>\u305d\u306e\u4e2d\u3067\u3001<span data-color=\"#ffff00\" style=\"background: linear-gradient(transparent 60%,rgba(255, 255, 0, 0.7) 0);\" class=\"vk_highlighter\">\u5b87\u5b99\u306b\u304a\u3044\u3066\u306f\u3001\u81ea\u5206\u304c\u3069\u306e\u65b9\u5411\u306b\u5411\u3044\u3066\u3044\u308b\u304b\u306e\u91cd\u8981\u6027\u304c\u8aac\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/span><br><br>Sense Hat \u4e0a\u306eIMU\uff08\u6163\u6027\u8a08\u6e2c\u30e6\u30cb\u30c3\u30c8\uff09\u30c1\u30c3\u30d7\u304c\u3053\u308c\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"240\" height=\"320\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/10\/sense_3.png\" alt=\"Sense Hat  IMU\uff08\u6163\u6027\u8a08\u6e2c\u30e6\u30cb\u30c3\u30c8\uff09\u30c1\u30c3\u30d7\u306e\u753b\u50cf\" class=\"wp-image-5411\" srcset=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/10\/sense_3.png 240w, https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/10\/sense_3-225x300.png 225w\" sizes=\"auto, (max-width: 240px) 100vw, 240px\" \/><\/figure>\n<\/div>\n\n\n<p>\u30c1\u30c3\u30d7\u306f\u4f59\u308a\u6ce8\u610f\u3057\u3066\u307f\u3066\u3044\u306a\u3044\u3067\u3059\u306d^^;<\/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\">\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u3001\u30e8\u30fc\u306b\u3064\u3044\u3066\u5b66\u3076<\/h2>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u3042\u308b\u8aac\u660e\u306f\u3053\u3046\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background\">\u5168\u3066\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f\u3001\u56de\u8ee2\u53ef\u80fd\u306a3\u3064\u306e\u8ef8\u304c\u3042\u308a\u307e\u3059\u3002<br><strong>\u30d4\u30c3\u30c1<\/strong> &#8211; \u98db\u884c\u6a5f\u304c\u96e2\u9678\u3059\u308b\u3068\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044<br><strong>\u30ed\u30fc\u30eb<\/strong> &#8211; \u52dd\u5229\u306e\u30ed\u30fc\u30eb\u3092\u3057\u3066\u3044\u308b\u98db\u884c\u6a5f\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044<br><strong>\u30e8\u30fc<\/strong> &#8211; \u8eca\u306e\u3088\u3046\u306b\u98db\u884c\u6a5f\u3092\u64cd\u7e26\u3059\u308b\u3053\u3068\u3092\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044<br><br>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5404\u8ef8\u3067\u3069\u306e\u304f\u3089\u3044\u306e\u56de\u8ee2\u304c\u884c\u308f\u308c\u305f\u304b\u3092\u77e5\u3063\u3066\u3044\u308c\u3070\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u3069\u306e\u3088\u3046\u306a\u4f4d\u7f6e\u3092\u6307\u3057\u3066\u3044\u308b\u304b\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3046\u30fc\u3093\u3001\u3044\u307e\u3044\u3061\u3001\u826f\u304f\u308f\u304b\u3089\u306a\u3044\u3067\u3059\u304c\u3001\u98db\u884c\u6a5f\u3092\u30e2\u30c7\u30eb\u306b\u8003\u3048\u308b\u3068\u3001\u3053\u306e\u4e09\u3064\u306e\u52d5\u304d\u3092\u7406\u89e3\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br><br>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u3042\u308b\u4ee5\u4e0b\u306e\u30d3\u30c7\u30aa\u3092\u898b\u308b\u3068\u3001\u3088\u304f\u308f\u304b\u308a\u307e\u3059\u306d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Airplane control - Roll, Pitch, Yaw\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/pQ24NtnaLl8?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>Sense Hat \u306e\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u3001\u30e8\u30fc\u306f\u3001\u3053\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u307e\u3059\uff08\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb Learn about pitch, roll, and yaw\u3088\u308a\u8ee2\u8f09\uff09\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"224\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/10\/pry.jpg\" alt=\"\u30d4\u30c3\u30c1\u30fb\u30ed\u30fc\u30eb\u30fb\u30e8\u30fc\u306e\u8aac\u660e\u753b\u50cf\" class=\"wp-image-5386\"\/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading is-style-vk-heading-double_black\">\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u3001\u30e8\u30fc\u3092\u691c\u51fa\u3059\u308b<\/h2>\n\n\n\n<p>\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u5f93\u3063\u3066\u3001\u73fe\u5728\u306e\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u3001\u30e8\u30fc\u3092\u691c\u51fa\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from sense_hat import SenseHat\nsense = SenseHat()\nsense.clear()o = sense.get_orientation()\npitch = o[&quot;pitch&quot;]\nroll = o[&quot;roll&quot;]\nyaw = o[&quot;yaw&quot;]\nprint(&quot;pitch {0} roll {1} yaw {2}&quot;.format(pitch, roll, yaw))<\/code><\/pre><\/div>\n\n\n\n<p>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3001Sense HAT\u3092\u52d5\u304b\u3057\u3001\u5024\u304c\u3069\u306e\u3088\u3046\u306b\u5909\u5316\u3059\u308b\u304b\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002 <\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>pitch 0.5117787640722093 roll 8.434573285292066 yaw 123.55536268910598<\/code><\/pre><\/div>\n\n\n\n<p>\u4ee5\u524d\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3053\u3046\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from sense_hat import SenseHat\n\nsense = SenseHat()\n\nwhile True:\n        orientation = sense.get_orientation()\n        pitch = orientation[&#39;pitch&#39;]\n        roll = orientation[&#39;roll&#39;]\n        yaw = orientation[&#39;yaw&#39;]\n        print(&quot;pitch={0}, roll={1}, yaw={2}&quot;.format(pitch,yaw,roll))<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u3061\u3089\u3092\u5b9f\u884c\u3057\u3066\u3001\u30e9\u30ba\u30d1\u30a4\u3092\u8272\u3005\u52d5\u304b\u3059\u3068\u3001\u3053\u3093\u306a\u7d50\u679c\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u30e9\u30ba\u30d1\u30a4\u306e\u4f4d\u7f6e\u304c\u5909\u5316\u3059\u308b\u306e\u306b\u3064\u308c\u3066\u3001pitch,roll,yaw \u306e\u5024\u304c\u3001\u305d\u306e\u4f4d\u7f6e\u306b\u5408\u308f\u305b\u3066\u3001\u5024\u304c\u6b21\u3005\u3068\u5909\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"325\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/10\/2018-10-14_2.jpg\" alt=\"\" class=\"wp-image-5389\"\/><\/figure>\n<\/div>\n\n\n<p>\u6570\u5024\u306e\u8868\u793a\u3059\u308b\u72b6\u6cc1\u306f\u76ee\u3067\u8ffd\u3044\u304d\u308c\u306a\u3044\u304f\u3089\u3044\u65e9\u3044\u3067\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\">\u52a0\u901f\u5ea6\u8a08\u306b\u3088\u308b\u8a08\u6e2c<\/h2>\n\n\n\n<p>sense.get_accelerometer_raw\uff08\uff09\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5404\u8ef8\uff08x\u3001y\u3001z\uff09\u306b\u4f5c\u7528\u3059\u308bG-force\u306e\u91cf \u3092\u793a\u3057\u307e\u3059\u3002<br><br>\u3044\u305a\u308c\u304b\u306e\u8ef8\u306b\u00b11G\u304c\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u8ef8\u304c\u4e0b\u3092\u6307\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<br><br>\u3053\u306e\u4f8b\u3067\u306f\u3001\u5404\u8ef8\u306e\u91cd\u529b\u52a0\u901f\u5ea6\u306e\u91cf\u304c\u62bd\u51fa\u3055\u308c\u3001\u6b21\u306b\u6700\u3082\u8fd1\u3044\u6574\u6570\u306b\u4e38\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from sense_hat import SenseHat\n\nsense = SenseHat()\n\nwhile True:\n        acceleration = sense.get_accelerometer_raw()\n        x = acceleration[&#39;x&#39;]\n        y = acceleration[&#39;y&#39;]\n        z = acceleration[&#39;z&#39;]\n\n        x=round(x, 0)\n        y=round(y, 0)\n        z=round(z, 0)\n\n        print(&quot;x={0}, y={1}, z={2}&quot;.format(x, y, z))<\/code><\/pre><\/div>\n\n\n\n<p>Sense HAT\u3092\u56de\u8ee2\u3055\u305b\u308b\u3068 x \u3068 y \u306e\u5024\u304c -1 \u3068 1 \u306e\u9593\u3067\u5909\u5316\u3057\u307e\u3059\u3002\u30e9\u30ba\u30d1\u30a4\u3092\u30d5\u30e9\u30c3\u30c8\u306b\u3057\u305f\u308a\u3001\u9006\u3055\u307e\u306b\u3059\u308b\u3068\u3001z\u8ef8\u306e\u5024\u306f 1 \u306b\u306a\u308a\u3001-1 \u306b\u306a\u308a\u307e\u3059\u3002<br><br>\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3057\u3066\u3001\u30e9\u30ba\u30d1\u30a4\u3092\u52d5\u304b\u3057\u305f\u7d50\u679c\u3067\u3059\u3002x,y,z \u306e\u5024\u304c\u6b21\u3005\u3068\u5909\u5316\u3057\u3066\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"284\" height=\"417\" src=\"https:\/\/www.mizutan.com\/wordpress\/wp-content\/uploads\/2018\/10\/2018-10-14.jpg\" alt=\"\" class=\"wp-image-5388\"\/><\/figure>\n<\/div>\n\n\n<p>\u76ee\u3067\u8ffd\u3048\u306a\u3044\u304f\u3089\u3044\u3067\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=\"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\">\u3069\u306e\u65b9\u5411\uff1f<\/h2>\n\n\n\n<p>Sense HAT \u304c\u3069\u306e\u65b9\u5411\u306b\u5411\u3044\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\uff08\u4ee5\u524d\u306b\u5b66\u7fd2\u3057\u305fset_rotation\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\uff09\u3057\u3001\u6587\u5b57 \u201d\uff2a\u201d \u3092\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306e\u5411\u304d\u306b\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from sense_hat import SenseHat\n\nsense = SenseHat()\n\n# Display the letter J\nsense.show_letter(&quot;J&quot;)\n\nwhile True:\n        acceleration = sense.get_accelerometer_raw()\n        x = acceleration[&#39;x&#39;]\n        y = acceleration[&#39;y&#39;]\n        z = acceleration[&#39;z&#39;]\n\n        x=round(x, 0)\n        y=round(y, 0)\n        z=round(z, 0)\n\n        print(&quot;x={0}, y={1}, z={2}&quot;.format(x, y, z))\n\n  # Update the rotation of the display depending on which way up the Sense HAT is\n        if x == -1:\n          sense.set_rotation(180)\n        elif y == 1:\n          sense.set_rotation(90)\n        elif y == -1:\n          sense.set_rotation(270)\n        else:\n          sense.set_rotation(0)<\/code><\/pre><\/div>\n\n\n\n<p>Sense Hat \u3092\u52d5\u304b\u3057\u3066\u8a66\u3057\u3066\u307f\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=\"MVI 6677\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/kWDEsXZKdRs?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>\u30dc\u30fc\u30c9\u304c\u56de\u8ee2\u3057\u3066\u3044\u308b\u3060\u3051\u306e\u5834\u5408\u306f\u3001\u3044\u305a\u308c\u306e\u65b9\u5411\u306b\u3082\uff11\uff27\u306e\u52a0\u901f\u5ea6\u304c\u767a\u751f\u3057\u307e\u3059\u3002Sense Hat \u3092\u632f\u3063\u3066\u307f\u308b\u3068\u3001\u30bb\u30f3\u30b5\u30fc\u306f\uff11G\u4ee5\u4e0a\u306e\u5024\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e0b\u8a18\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u30bb\u30f3\u30b5\u30fc\u304c x,y,z \u8ef8\u3044\u305a\u308c\u304b\u306b\uff11\u4ee5\u4e0a\u306e\u5024\u3092\u691c\u77e5\u3057\u305f\u5834\u5408\u3001\uff2c\uff25\uff24\u306b\u8d64\u3044\uff01\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>from sense_hat import SenseHat\n\nsense = SenseHat()\n\nred = (255, 0, 0)\n\nwhile True:\nacceleration = sense.get_accelerometer_raw()\nx = acceleration[&#39;x&#39;]\ny = acceleration[&#39;y&#39;]\nz = acceleration[&#39;z&#39;]\n\nx = abs(x)\ny = abs(y)\nz = abs(z)\n\nif x &gt; 1 or y &gt; 1 or z &gt; 1:\nsense.show_letter(&quot;!&quot;, red)\nelse:\nsense.clear()<\/code><\/pre><\/div>\n\n\n\n<p>\u5b9f\u969b\u306b Sense HAT \u3092\u632f\u3063\u3066\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u8d64\u306e\uff01\u3092\u5224\u5b9a\u3059\u308b\u306e\u306f\u3061\u3087\u3063\u3068\u96e3\u3057\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4e00\u77ac\u3001\u8d64\u3044\u4f55\u304b\u304c\u8868\u793a\u3059\u308b\u3055\u307e\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\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=\"MVI 6678\" width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/bpofXRIj1Jg?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>\u4f55\u304b\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u3057\u3044\u3068\u306f\u308f\u304b\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5185\u5bb9\u3092\u628a\u63e1\u3059\u308b\u306e\u306f\u7121\u7406\u3067\u3059\u306a\u3042\uff01<\/p>\n\n\n\n<p>\u203bsense hat \u3067\u904a\u3076\u306e\u4e00\u3064\u524d\u3068\u6b21\u306e\u8a18\u4e8b\u3092\u7d39\u4ecb\u3057\u3066\u3044\u307e\u3059\u3002<br>\u21d2 previous:<strong><a href=\"https:\/\/www.mizutan.com\/wordpress\/?p=1131\" target=\"_blank\" rel=\"noreferrer noopener\">sense hat\u3067\u6e2c\u5b9a\u3057\u305f\u6e29\u5ea6\u3068\u6e7f\u5ea6\u53ca\u3073\u6c17\u5727\u3092python\u3067\u30b0\u30e9\u30d5\u8868\u793a<\/a><\/strong><br>\u21d2 next:<strong><a href=\"https:\/\/www.mizutan.com\/wordpress\/?p=5362\" target=\"_blank\" rel=\"noreferrer noopener\">sense hat\u306e\u30b8\u30e7\u30a4\u30b9\u30c6\u30a3\u30c3\u30af\u3092\u4f7f\u7528\u3057\u3066\u65b9\u5411\u3092\u691c\u51fa\u3057\u3066\u307f\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>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001sense hat\u306b\u642d\u8f09\u3055\u308c\u3066\u3044\u308b\u6163\u6027\u8a08\u6e2c\u30e6\u30cb\u30c3\u30c8\u3092\u4f7f\u3063\u3066\u52d5\u4f5c\u306e\u691c\u51fa\u3092\u884c\u3044\u307e\u3057\u305f\u3002<br><br>\u30d4\u30c3\u30c1\u3001\u30ed\u30fc\u30eb\u3001\u30e8\u30fc\u306b\u3064\u3044\u3066\u5b66\u3093\u3060\u3042\u3068\u3001\u305d\u308c\u3089\u306e\u5024\u3092\u691c\u51fa\u3057\u307e\u3057\u305f\u3002<br><br>\u3055\u3089\u306b\u306f\u3001\u52a0\u901f\u5ea6\u8a08\u3084\u65b9\u5411\u3092\u793a\u3059\u52d5\u4f5c\u691c\u51fa\u3092\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br><br>60\u723a\u306b\u306f\u3001\u3061\u3087\u3063\u3068\u96e3\u3057\u304b\u3063\u305f\u6f22\u5b57\u3067\u3059\u306a\uff01<\/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\">sense hat\u3067\u904a\u3076\uff01<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u975e\u5e38\u306b\u4e45\u65b9\u3076\u308a\u306e Sense Hat \u306e part6 \u3067\u3059\u3002\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u5f93\u3044\u3001IMU\u3092\u89e6\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u300cDetecting movement\u300d\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u8aac\u660e\u304c\u51fa\u3066\u3044\u307e\u3059\u3002 Sense HAT\u306b\u306f\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5411,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[348],"tags":[],"class_list":["post-5359","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\/5359","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=5359"}],"version-history":[{"count":18,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5359\/revisions"}],"predecessor-version":[{"id":26871,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5359\/revisions\/26871"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/5411"}],"wp:attachment":[{"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mizutan.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}