{"id":3048,"date":"2017-12-31T16:15:26","date_gmt":"2017-12-31T07:15:26","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/?p=3048"},"modified":"2022-08-21T20:56:48","modified_gmt":"2022-08-21T11:56:48","slug":"microbit-%e3%81%a7%e9%81%8a%e3%82%93%e3%81%a7%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/3048","title":{"rendered":"micro:bit \u3067\u904a\u3093\u3067\u307f\u305f"},"content":{"rendered":"<p>\u51ac\u4f11\u307f\u306e\u81ea\u7531\u8ab2\u984c\u3068\u3057\u3066 micro:bit \u3067\u904a\u3093\u3067\u307f\u305f\u3002<br \/>\n<a href=\"http:\/\/microbit.org\/ja\/\">http:\/\/microbit.org\/ja\/<\/a><br \/>\n\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u79cb\u6708\u96fb\u5b50\u3067\u8cfc\u5165\u3057\u305f\u3002<br \/>\n<a href=\"http:\/\/akizukidenshi.com\/catalog\/g\/gM-12513\/\">http:\/\/akizukidenshi.com\/catalog\/g\/gM-12513\/<\/a><\/p>\n<h2>\u6700\u521d\u306e\u8d77\u52d5<\/h2>\n<p>PC\u3068 micro:bit \u3068\u3092 USB-Micro USB \u306e\u30b1\u30fc\u30d6\u30eb\u3067\u63a5\u7d9a\u3059\u308b\u3068\u3001\u81ea\u52d5\u7684\u306b\u8d77\u52d5\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\uff08Hello.\uff09\u304c\u8868\u793a\u3055\u308c\u308b\u3002<br \/>\n\u305d\u306e\u5f8c\u3001\u5de6\u30dc\u30bf\u30f3\uff08A\uff09\u3068\u53f3\u30dc\u30bf\u30f3\uff08B\uff09\u3092\u62bc\u3059\u3088\u3046\u306b\u4fc3\u3055\u308c\u308b\u3002\u3055\u3089\u306b SHAKE \u3068\u8868\u793a\u3055\u308c\u308b\u306e\u3067 micro:bit \u3092\u632f\u308b\u3002<br \/>\n\u6b21\u306bCHASE\u306e\u8868\u793a\u306e\u5f8c\u3067\u70b9\u6ec5\u3059\u308b\u8d64\u3044LED\u304c\u73fe\u308c\u308b\u3002micro:bit \u3092\u50be\u3051\u308b\u3068\u70b9\u706f\u3059\u308bLED\u304c\u52d5\u304f\u306e\u3067\u3001\u9069\u5f53\u306b\u50be\u3051\u3066\u70b9\u6ec5\u3059\u308bLED\u306b\u91cd\u306d\u308b\u3002\uff12\u56de\u307b\u3069\u884c\u3046\u3068\u300cGREAT NOW GET CODING!\u300d\u8868\u793a\u3055\u308c\u305f\u3042\u3068\u3001LED\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304c\u5ef6\u3005\u3068\u7d9a\u304f\u3002<\/p>\n<h2>JavaScript \u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf<\/h2>\n<p>\u81ea\u5206\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u3063\u3066 micro:bit \u306b\u8ee2\u9001\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002micro:bit \u306e\u30b5\u30a4\u30c8\u306b\u306f\u4f55\u7a2e\u985e\u304b\u306e\u65b9\u6cd5\u304c\u63d0\u793a\u3055\u308c\u3066\u3044\u308b\u3002<br \/>\n<a href=\"http:\/\/microbit.org\/ja\/code\/\">http:\/\/microbit.org\/ja\/code\/<\/a><br \/>\n\u4e00\u756a\u624b\u3063\u53d6\u308a\u65e9\u3044\u306e\u306fJavaScript\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u3067\u3001\u3044\u308f\u3086\u308b Scratch \u98a8\u306e\u30d6\u30ed\u30c3\u30af\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u304c\u3067\u304d\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3049 size-full\" src=\"http:\/\/oohito.com\/nqthm\/wp-content\/uploads\/2017\/12\/Screenshot_2017-12-31_15-14-26-1.png\" alt=\"\" width=\"1920\" height=\"1011\" \/><br \/>\n\u30d6\u30e9\u30a6\u30b6\u306b Scratch 2.0 \u98a8\u306e\u914d\u7f6e\u306e\u7de8\u96c6\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u3002\u4e2d\u592e\u306e\u30d1\u30ec\u30c3\u30c8\u304b\u3089\u53f3\u5074\u306e\u30d6\u30ed\u30c3\u30af\u30a8\u30ea\u30a2\u306b\u30c9\u30e9\u30c3\u30b0\uff06\u30c9\u30ed\u30c3\u30d7\u3067\u30d6\u30ed\u30c3\u30af\u3092\u914d\u7f6e\u3057\u3066\u3044\u304f\u3002\u300c\u6700\u521d\u3060\u3051\u300d\u3084\u300c\u305a\u3063\u3068\u300d\u306e\u4e2d\u306b\u30d6\u30ed\u30c3\u30af\u3092\u914d\u7f6e\u3057\u3066\u3044\u3051\u3070 Arduino \u306e\u3088\u3046\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308c\u308b\u3002\u4e0a\u90e8\u306b\u3042\u308b JavaScript \u30dc\u30bf\u30f3\u3092\u62bc\u305b\u3070 JavaScript \u306e\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3057\u3066\u8868\u793a\u3055\u308c\u308b\u3002<br \/>\n\u79c0\u9038\u306a\u306e\u306f\u3001\u30d6\u30ed\u30c3\u30af\u3092\u7de8\u96c6\u3059\u308b\u305f\u3073\u306b\u5de6\u5074\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b micro:bit \u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u52d5\u4f5c\u304c\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3060\u3002\u97f3\u95a2\u4fc2\u306e\u30d6\u30ed\u30c3\u30af\u3092\u53d6\u308a\u51fa\u3059\u3068\u3001\u3069\u306e\u3088\u3046\u306b\u30b9\u30d4\u30fc\u30ab\u30fc\u306b\u914d\u7dda\u3059\u308b\u304b\u3082\u56f3\u793a\u3055\u308c\u308b\u3002<br \/>\n\u30d7\u30ed\u30b0\u30e9\u30e0\u3092 micro:bit \u306b\u8ee2\u9001\u3059\u308b\u306b\u306f\u300c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u305b\u3070\u3088\u3044\u3002\u62e1\u5f35\u5b50\u304c hex \u306e\u30d5\u30a1\u30a4\u30eb\u304c\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u308c\u308b\u306e\u3067\u3001\u305d\u308c\u3092 micro:bit \u306b\u8ee2\u9001\u3059\u308b\u3002micro:bit \u306fPC\u306b\u63a5\u7d9a\u3059\u308b\u3068\u5916\u4ed8\u3051\u30e1\u30c7\u30a3\u30a2\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u308b\u304c\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f hex \u30d5\u30a1\u30a4\u30eb\u3092\u305d\u306e\u30e1\u30c7\u30a3\u30a2\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3067\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u8ee2\u9001\u3055\u308c\u308b\u3002<\/p>\n<h3>\u30aa\u30d5\u30e9\u30a4\u30f3\u7248<\/h3>\n<p>JavaScript \u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u306f\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u3057\u304b\u5229\u7528\u3067\u304d\u306a\u3044\u304c\u3001Docker \u3092\u7528\u3044\u3066\u30b5\u30fc\u30d0\u30fc\u74b0\u5883\u3092\u69cb\u7bc9\u3059\u308c\u3070\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u3082\u5229\u7528\u3067\u304d\u308b\uff08\u3089\u3057\u3044\u3002\u8a66\u3057\u3066\u3044\u306a\u3044\uff09\u3002<br \/>\n<a href=\"https:\/\/hub.docker.com\/r\/kadok0520\/pxt-microbit\/\">https:\/\/hub.docker.com\/r\/kadok0520\/pxt-microbit\/<\/a><\/p>\n<h2>Python \u30a8\u30c7\u30a3\u30bf\u30fc<\/h2>\n<p>micro:bit \u306e\u30b5\u30a4\u30c8\u306b\u306f Python \u306e\u30b3\u30fc\u30c9\u3092\u5165\u529b\u3067\u304d\u308b\u30a8\u30c7\u30a3\u30bf\u3082\u3042\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3050 size-full\" src=\"http:\/\/oohito.com\/nqthm\/wp-content\/uploads\/2017\/12\/Screenshot_2017-12-31_15-40-42-1.png\" alt=\"\" width=\"1920\" height=\"1003\" \/><br \/>\n\u753b\u9762\u306b Python \u30b3\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u3060\u3051\u3002Download \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066 hex \u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u306e\u306f JavaScript \u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u3068\u540c\u69d8\u3067\u3042\u308b\u3002<br \/>\nmicro:bit\u3067\u5229\u7528\u3067\u304d\u308b\u306e\u306f MicroPython \u3067\u3001\u3069\u3093\u306a\u6a5f\u80fd\u304c\u4f7f\u3048\u308b\u304b\u306f\u4ee5\u4e0b\u306e\u30b5\u30a4\u30c8\u3067\u78ba\u8a8d\u3067\u304d\u308b\u3002<br \/>\n<a href=\"http:\/\/microbit.org\/ja\/guide\/python\/\">http:\/\/microbit.org\/ja\/guide\/python\/<\/a><br \/>\n\u3044\u308f\u3086\u308bL\u30c1\u30ab\u306f\u3001\u3053\u3093\u306a\u98a8\u306b\u66f8\u3051\u308b\u3002<\/p>\n<pre><span class=\"kn\">from<\/span> <span class=\"nn\">microbit<\/span> <span class=\"k\">import<\/span> <span class=\"o\">*<\/span>\n<span class=\"k\">while<\/span> <span class=\"kc\">True<\/span><span class=\"p\">:<\/span>\n    <span class=\"n\">pin0<\/span><span class=\"o\">.<\/span><span class=\"n\">write_digital<\/span><span class=\"p\">(<\/span><span class=\"mi\">1<\/span><span class=\"p\">)<\/span>\n    <span class=\"n\">sleep<\/span><span class=\"p\">(<\/span><span class=\"mi\">500<\/span><span class=\"p\">)<\/span>\n    <span class=\"n\">pin0<\/span><span class=\"o\">.<\/span><span class=\"n\">write_digital<\/span><span class=\"p\">(<\/span><span class=\"mi\">0<\/span><span class=\"p\">)<\/span>\n    <span class=\"n\">sleep<\/span><span class=\"p\">(<\/span><span class=\"mi\">500<\/span><span class=\"p\">)<\/span><\/pre>\n<h2>mu \u30a8\u30c7\u30a3\u30bf\uff08MicroPython\uff09<\/h2>\n<p>\u4e0a\u306e\uff12\u3064\u306f\u3044\u305a\u308c\u3082\u30d6\u30e9\u30a6\u30b6\u4e0a\u306e\u30a2\u30d7\u30ea\u3068\u3057\u3066 micro:bit \u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u884c\u3046\u3082\u306e\u3060\u3063\u305f\u304c\u3001PC\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u30bf\u30a4\u30d7\u306e\u3082\u306e\u3082\u3042\u308b\u3002mu \u30a8\u30c7\u30a3\u30bf\u306fPC\u4e0a\u3067 MicroPython \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<br \/>\n<a href=\"https:\/\/codewith.mu\/\">https:\/\/codewith.mu\/<\/a><br \/>\nWindows, OS\/X, Linux \u7248\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u3002Linux\u7248\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001 mu-0.9.13.linux.bin \u306e\u3088\u3046\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u5f97\u3089\u308c\u308b\u306e\u3067\u3001\u9069\u5f53\u306a\u540d\u524d\u306b\u5909\u66f4\u3059\u308b\u304b\u30b7\u30f3\u30dc\u30ea\u30c3\u30af\u30ea\u30f3\u30af\u3092\u4f5c\u6210\u3059\u308b\u3002\u307e\u305f\u3001\u5b9f\u884c\u5f62\u5f0f\u306e\u30d5\u30e9\u30b0\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3051 size-full\" src=\"http:\/\/oohito.com\/nqthm\/wp-content\/uploads\/2017\/12\/Screenshot_2017-12-31_17-15-35-1.png\" alt=\"\" width=\"1099\" height=\"531\" \/><br \/>\nPython \u30a8\u30c7\u30a3\u30bf\u30fc\u306b\u4f3c\u305f\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u3001Python \u30b3\u30fc\u30c9\u3092\u5165\u529b\u3067\u304d\u308b\u3002 Flash \u30dc\u30bf\u30f3\u3092\u4f7f\u3046\u3068\u76f4\u63a5 micro:bit \u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u8ee2\u9001\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u305f\u3060\u3057\u3001\uff08\u304a\u305d\u3089\u304f\uff09 dialout \u306e\u30b0\u30eb\u30fc\u30d7\u306b\u30e6\u30fc\u30b6\u30fc\u3092\u767b\u9332\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<h2>mbed\uff08C++\uff09<\/h2>\n<p><a href=\"https:\/\/www.mbed.com\/en\/\">arm Mbed cloud<\/a> \u4e0a\u3067\u3082 micro:bit \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3067\u304d\u308b\u3002\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u3066\u30b5\u30a4\u30c8\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304a\u304d\u3001\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u958b\u304f\u3002<br \/>\n<a href=\"https:\/\/os.mbed.com\/platforms\/Microbit\/\">https:\/\/os.mbed.com\/platforms\/Microbit\/<\/a><br \/>\n\u753b\u9762\u4e2d\u7a0b\u306e\u53f3\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u3042\u308b\u300cAdd to your mbed compiler\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001mbed \u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306b micro:bit \u7528\u306e\u30b3\u30f3\u30d1\u30a4\u30e9\u304c\u8ffd\u52a0\u3055\u308c\u308b\u3002\u540c\u3058\u30da\u30fc\u30b8\u306b\u3042\u308b\u300cmicrobit-hello-world\u300d\u306a\u3069\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308c\u3070\u3001\u9069\u5f53\u306a\u30b5\u30f3\u30d7\u30eb\u3092\u8a66\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<h2>\u305d\u306e\u4ed6<\/h2>\n<p>\u30b9\u30de\u30db\u3084\u30bf\u30d6\u30ec\u30c3\u30c8\u306e\u30a2\u30d7\u30ea\u304b\u3089\u3082 micro:bit \u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308c\u308b\u3089\u3057\u3044\u3002\u500b\u4eba\u7684\u306b\u306f JavaScript \u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u304c\u4f7f\u3044\u3084\u3059\u3044\u3088\u3046\u306b\u601d\u3048\u308b\u3002\u30bc\u30df\u3067\u306f arduino \u3092\u4f7f\u3063\u3066\u3044\u308b\u304c\u3001\u4fa1\u683c\u306e\u9055\u3044\u3092\u5dee\u3063\u5f15\u3044\u3066\u3082\u6765\u5e74\u5ea6\u306f micro:bit \u3092\u4f7f\u3044\u305f\u3044\u885d\u52d5\u306b\u99c6\u3089\u308c\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51ac\u4f11\u307f\u306e\u81ea\u7531\u8ab2\u984c\u3068\u3057\u3066 micro:bit \u3067\u904a\u3093\u3067\u307f\u305f\u3002 http:\/\/microbit.org\/ja\/ \u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u79cb\u6708\u96fb\u5b50\u3067\u8cfc\u5165\u3057\u305f\u3002 http:\/\/akizukidenshi.com\/catalog\/g\/gM-1&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-3048","post","type-post","status-publish","format-standard","hentry","category-microbit"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/3048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=3048"}],"version-history":[{"count":1,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/3048\/revisions"}],"predecessor-version":[{"id":3511,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/3048\/revisions\/3511"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=3048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=3048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=3048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}