{"id":581,"date":"2025-06-02T06:32:09","date_gmt":"2025-06-01T21:32:09","guid":{"rendered":"https:\/\/tanep.work\/tanech\/?p=581"},"modified":"2025-06-02T06:51:03","modified_gmt":"2025-06-01T21:51:03","slug":"post-581","status":"publish","type":"post","link":"https:\/\/tanep.work\/tanech\/2025\/06\/02\/post-581\/","title":{"rendered":"Raspberry Pi PICO W \u3067 Bluetooth (BLE HID) \u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"\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=\"\u3010Bluetooth\u306e\u4f7f\u3044\u65b9\u3011Bluetooth\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3068Raspberry Pi PICO W \u306e\u63a5\u7d9a\u306e\u4ed5\u65b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3010\u96fb\u5b50\u5de5\u4f5c\u5165\u9580\u3011\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/DrwTmrqhjnc?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<h2 class=\"wp-block-heading\">\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u6982\u8981<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">100\u5186\u30b7\u30e7\u30c3\u30d7\u3067\u3053\u3093\u306a\u88fd\u54c1\u826f\u304f\u58f2\u3089\u308c\u3066\u3044\u307e\u3059\u3088\u306d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-1024x768.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Bluetooth\u3067\u30b9\u30de\u30db\u306b\u63a5\u7d9a\u3057\u3066\u3001\u30ab\u30e1\u30e9\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u3092\u30ea\u30e2\u30fc\u30c8\u3067\u62bc\u305b\u308b\u88fd\u54c1\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Raspberry Pi Pico W \u306fBluetooth\u304c\u642d\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3067\u64cd\u4f5c\u3067\u304d\u305f\u3089\u7d20\u6575\u3067\u3059\u3088\u306d\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u4eca\u56de\u306f\u305d\u306e\u3084\u308a\u65b9\u306b\u3064\u3044\u3066\u3054\u6848\u5185\u81f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">PICO W\u3067\u306eBluetooth\u5229\u7528\u306b\u3064\u3044\u3066\u306f\u3001\u65e5\u672c\u3001\u6d77\u5916\u3067\u691c\u7d22\u3057\u3066\u3082\u307b\u3068\u3093\u3069\u8cc7\u6599\u304c\u51fa\u3066\u304d\u307e\u305b\u3093\u306e\u3067\u3001\u3053\u306e\u52d5\u753b\u306f\u8cb4\u91cd\u306a\u8cc7\u6599\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u4eca\u56de\u306f\u3001<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Bluetooth\u306e\u898f\u683c\u306b\u3064\u3044\u3066\u306e\u89e3\u8aac<\/li>\n\n\n\n<li>Bluetooth\u88fd\u54c1\u306e\u4ed5\u69d8\u306e\u8abf\u3079\u65b9<\/li>\n\n\n\n<li>\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u89e3\u8aac<\/li>\n\n\n\n<li>\u4f5c\u54c1\u306e\u30c7\u30e2<\/li>\n<\/ol>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u306e\u9806\u3067\u3054\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bluetooth\u306e\u898f\u683c\u306b\u3064\u3044\u3066\u306e\u89e3\u8aac<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u307e\u305a\u3001Bluetooth\u306e\u898f\u683c\u306f\u3001\u5c02\u9580\u7528\u8a9e\u306e\u5b9d\u5eab\u3067\u3059\u3002\u65b0\u3057\u3044\u8a00\u8449\u304c\u6ca2\u5c71\u3067\u3066\u304d\u307e\u3059\u306e\u3067\u3001\u6700\u521d\u306b\u3001\u308f\u304b\u308a\u3084\u3059\u304f\u307e\u3068\u3081\u3066\u3054\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Bluetooth\u306e\u898f\u683c<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Bluetooth\u306b\u306f\u5927\u304d\u304f\uff12\u7a2e\u985e\u306e\u898f\u683c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Bluetooth Classic \u3068 BLE (Bluetooth Low Energy) \u3067\u3059\u3002\nBluetooth Classic\u306f\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u8ee2\u9001\u304c\u4e3b\u306a\u76ee\u7684\u3067\u3001\u901a\u8a71\u3084\u97f3\u697d\u518d\u751f\u306a\u3069\u306e\u7528\u9014\u3067\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">BLE\u306fClassic\u3088\u308a\u3082\u4f4e\u6d88\u8cbb\u96fb\u529b\u3067\u3001IoT\u30c7\u30d0\u30a4\u30b9\u3084\u3001\u30a6\u30a7\u30a2\u30e9\u30d6\u30eb\u30c7\u30d0\u30a4\u30b9\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u306a\u3069\u306e\u99c6\u52d5\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u4eca\u56de\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3082BLE\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u3067\u3059\u306e\u3067\u3001\u4eca\u56de\u306fBLE\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u3054\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">BLE\u306e\u30d7\u30ed\u30c8\u30b3\u30eb<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-1-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Bluetooth\u306e\u901a\u4fe1\u898f\u7d04\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u3001\u6a5f\u5668\u9593\u306e\u63a5\u7d9a\u306e\u3084\u308a\u65b9\u3092\u53d6\u308a\u6c7a\u3081\u308bGAP (Generic Access Profile) \u3068\u30c7\u30fc\u30bf\u69cb\u9020\u3068\u5b9f\u969b\u306e\u901a\u4fe1\u306e\u4ed5\u65b9\u3092\u53d6\u308a\u6c7a\u3081\u308bGATT (Generic Attribute Profile) \u3067\u6210\u308a\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">GAP\uff08Generic Access Profile\uff09<\/h4>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u307e\u305aGAP\u3001\u63a5\u7d9a\u306b\u3064\u3044\u3066\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u304b\u3089\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>\u901a\u4fe1\u306e\u89aa\u5b50\u95a2\u4fc2<\/strong><\/h5>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/7-1024x576.png\" alt=\"\" class=\"wp-image-582\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/7-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/7-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/7-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/7.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">WEB\u30b7\u30b9\u30c6\u30e0\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u30b5\u30fc\u30d0\u304c\u3042\u308b\u3088\u3046\u306b\u3001Bluetooth\u306b\u3082\u89aa\u5b50\u95a2\u4fc2\u304c\u3042\u308a\u307e\u3059\u3002<br>\u305d\u308c\u304c\u3001Central\u3068Peripheral\u3067\u3059\u3002<br>Central\u304c\u30b5\u30fc\u30d0\u306b\u76f8\u5f53\u3059\u308b\u89aa\u6a5f\u306b\u306a\u308a\u307e\u3059\u3002<br>\u4eca\u56de\u306fPICO W\u3092Central\u3068\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002<br>Peripheral\u306f\u5b50\u6a5f\u306b\u76f8\u5f53\u3057\u3001\u30bb\u30f3\u30b5\u30fc\u3084\u30b9\u30de\u30fc\u30c8\u30a6\u30a9\u30c3\u30c1\u304c\u3053\u308c\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002<br>\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3082Peripheral\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>\u63a5\u7d9a\u306e\u624b\u9806<\/strong><\/h5>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/8-1024x576.png\" alt=\"\" class=\"wp-image-583\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/8-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/8-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/8-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/8.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Central\u306f\u3001\u5468\u308a\u306bPeripheral\u304c\u3044\u306a\u3044\u304b\uff1f\u3068Scan\u3057\u307e\u3059\u3002<br>\u305d\u3057\u3066Peripheral\u306f\u3001\u79c1\u3092\u898b\u3064\u3051\u3066\uff01\u3068Advertise\u3068\u3044\u3046\u96fb\u6ce2\u3092\u767a\u4fe1\u3057\u307e\u3059\u3002<br>Central\u304cAdvertise\u3092\u53d7\u4fe1\u3059\u308b\u3068\u3001\u53d7\u4fe1\u30ea\u30b9\u30c8\u304c\u5f97\u3089\u308c\u307e\u3059\u306e\u3067\u3001\u305d\u306e\u306a\u304b\u304b\u3089\u63a5\u7d9a\u3057\u305f\u3044\u6a5f\u5668\u3092\u6307\u5b9a\u3057\u3066\u3001Connect\u3057\u307e\u3059\u3002\u3059\u308b\u3068Bluetooth\u901a\u4fe1\u304c\u3067\u304d\u308b\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002<br>Bluetooth\u6a5f\u5668\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u306a\u304f\u306a\u3063\u305f\u6642\u306f\u3001Disconnect\u3057\u3066\u63a5\u7d9a\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/9-1024x576.png\" alt=\"\" class=\"wp-image-584\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/9-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/9-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/9-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/9.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/10-1024x576.png\" alt=\"\" class=\"wp-image-585\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/10-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/10-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/10-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/10.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>GATT (Generic Attribute Profile)<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/11-1024x576.png\" alt=\"\" class=\"wp-image-586\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/11-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/11-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/11-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/11.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>GAP\u306b\u3088\u308a\u6a5f\u5668\u540c\u58eb\u3067\u63a5\u7d9a\u304c\u3067\u304d\u305f\u3089\u3001\u3044\u3088\u3044\u3088\u30c7\u30fc\u30bf\u901a\u4fe1\u306e\u6e96\u5099\u3092\u7d4c\u3066\u3001\u901a\u4fe1\u3092\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u305d\u308c\u3089\u3092\u3068\u308a\u307e\u3068\u3081\u305f\u30d7\u30ed\u30c8\u30b3\u30eb\u304cGATT\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/12-1024x576.jpg\" alt=\"\" class=\"wp-image-589\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/12-1024x576.jpg 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/12-300x169.jpg 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/12-768x432.jpg 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/12.jpg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Bluetooth\u901a\u4fe1\u306e\u305f\u3081\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306f\u3001\u673a\u306e\u5f15\u304d\u51fa\u3057\u306e\u4e2d\u306b\u30d5\u30a9\u30eb\u30c0\u304c\u8907\u6570\u5165\u3063\u3066\u3044\u3066\u3001\u305d\u306e\u5404\u3005\u306e\u4e2d\u306b\u5fc5\u8981\u306a\u66f8\u985e\u304c\u5165\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u6349\u3048\u308b\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Service<\/strong><\/h5>\n\n\n\n<p>\u307e\u305a\u3001\u673a\u306e\u5f15\u304d\u51fa\u3057\u306b\u76f8\u5f53\u3059\u308b\u6982\u5ff5\u304cService\u3067\u3059\u3002\u3069\u3093\u306a\u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u306e\u304b\u3092\u307e\u3068\u3081\u305f\u5165\u308c\u7269\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Characteristic<\/strong><\/h5>\n\n\n\n<p>\u5f15\u304d\u51fa\u3057\u306e\u4e2d\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u76f8\u5f53\u3059\u308b\u6982\u5ff5\u304cCharacteristic\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u4f53\u6e29\u8a08\u3001\u5fc3\u62cd\u8a08\u306a\u3069\u3001\u8907\u6570\u306e\u6a5f\u80fd\u3092\u6301\u3063\u305f\u30b9\u30de\u30fc\u30c8\u30a6\u30a9\u30c3\u30c1\u306e\u3088\u3046\u306a\u6a5f\u5668\u306e\u5834\u5408\u3001\u6a5f\u80fd\u6bce\u306b\u8907\u6570\u306eCharacteristic\u3092\u6301\u3063\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Value<\/strong><\/h5>\n\n\n\n<p>Characteristic\u306e\u6301\u3063\u3066\u3044\u308b\u5024\u304cValue\u306b\u306a\u308a\u307e\u3059\u3002\u4f53\u6e29\u8a08\u306e\u5834\u5408\u306f\u4f53\u6e29\u3002\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u5834\u5408\u306f\u3069\u306e\u30ad\u30fc\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u304b\u3002\u3068\u3044\u3063\u305f\u60c5\u5831\u304c\u5165\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>Property<\/strong><\/h5>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/13-1-1024x576.png\" alt=\"\" class=\"wp-image-590\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/13-1-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/13-1-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/13-1-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/13-1.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Characteristic\u306eValue\u304c\u8aad\u307f\u66f8\u304d\u3067\u304d\u308b\u306e\u304b\u3092\u793a\u3059\u5c5e\u6027\u3067\u3059\u3002<\/p>\n\n\n\n<p>Property\u306b\u306f\u3001\u4ee5\u4e0b\u306e\uff13\u7a2e\u985e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>Read<\/strong>\uff1aValue\u3092\u8aad\u307f\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p><strong>Write<\/strong>\uff1aValue\u306b\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p><strong>Notify<\/strong>\uff1aCharacteristic\u306eValue\u304c\u5909\u5316\u3057\u305f\u3089\u3001\u305d\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067Central\u306b\u5411\u3051\u3066Value\u3092\u901a\u77e5\u3059\u308b\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\"><strong>UUID<\/strong><\/h5>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/14-1024x576.png\" alt=\"\" class=\"wp-image-591\" srcset=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/14-1024x576.png 1024w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/14-300x169.png 300w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/14-768x432.png 768w, https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/14.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>GATT\u3067\u306f\u3001Service\u3001Characteristic\u306e\uff12\u968e\u5c64\u69cb\u9020\u3067Value\u3092\u683c\u7d0d\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u308c\u3089\u306b\u3064\u3051\u3089\u308c\u305fID\u304cUUID\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306f\u540d\u524d\u3067\u306f\u306a\u304f\u3001UUID\u3068\u3044\u3046\u756a\u53f7\u3067\u8b58\u5225\u3055\u308c\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bluetooth\u88fd\u54c1\u306e\u4ed5\u69d8\u306e\u8abf\u3079\u65b9<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Bluetooth\u88fd\u54c1\u306e\u4ed5\u69d8\u306e\u8abf\u3079\u65b9\u306f\u3001\u30b9\u30de\u30db\u306e\u30a2\u30d7\u30ea\u3067\u4fbf\u5229\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002LightBule\u3068\u3044\u3046\u30a2\u30d7\u30ea\u3067\u3001\u3053\u308c\u3092\u4f7f\u3046\u3068\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u8abf\u3079\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Service\u3068Characteristic\u306eUUID<\/li>\n\n\n\n<li>Characteristic\u306e\u7a2e\u985e<\/li>\n\n\n\n<li>Characteristic\u306eProperty<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">LightBule\u306e\u4f7f\u3044\u65b9<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-2-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u63a5\u7d9a\u3057\u305f\u3044Bluetooth\u6a5f\u5668\u3092\u898b\u3064\u3051\u3066CONNECT\u3092\u62bc\u3057\u307e\u3059\u3002\u4eca\u56de\u306e\u88fd\u54c1\u306e\u6a5f\u5668\u540d\u306f BT Shutter \u3067\u3059\u3002\u3053\u308c\u306f\u88fd\u54c1\u306e\u7bb1\u3084\u30de\u30cb\u30e5\u30a2\u30eb\u306b\u8a18\u8f09\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-3-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Advertised service UUIDs \u306e\u4e0b\u306e\u6570\u5024\u306e\u5148\u982d\uff14\u6841\u3002\u3053\u306e\u5834\u5408\u30011812\u304c\u3053\u306e\u30c7\u30d0\u30a4\u30b9\u306eService\u306eUUID\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u306e1812\u306f16\u9032\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u3064\u3065\u3044\u3066\u3001Device Addres\u6b04\u3092\u898b\u307e\u3059\u3002\u3053\u306e\u4e0b\u306e\u30b3\u30ed\u30f3\u533a\u5207\u308a\u306e16\u9032\u6570\u306e\u6570\u5024\u304c\u3001\u3053\u306e\u30c7\u30d0\u30a4\u30b9\u306e\u756a\u53f7\u3067\u3001Connect\u6642\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-4-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u4e0b\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u3068\u3001HUMAN INTERFACE DEVICE \u306e\u6587\u5b57\u304c\u3042\u308a\u307e\u3059\u3002\u901a\u79f0HID\u3068\u547c\u3070\u308c\u308b\u3082\u306e\u3067\u3001\u30ad\u30fc\u30dc\u30fc\u30c9\u3084\u30de\u30a6\u30b9\u306a\u3069\u3067\u4e00\u822c\u7684\u306b\u4f7f\u308f\u308c\u3066\u3044\u308bService\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-5-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">HID\u30b5\u30fc\u30d3\u30b9\u306e\u4e2d\u306b\u3001Report\u3068\u8a00\u3046\u540d\u524d\u306e\u3082\u306e\u304c\uff12\u3064\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u304c\u3001\u30dc\u30bf\u30f3\u306e\u72b6\u614b\u3092\u8868\u3059Characteristic\u3067\u3059\u3002\u3053\u308c\u3089\u3092\u958b\u3044\u3066\u4e2d\u3092\u898b\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-6-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u3059\u308b\u3068\u3001Characteristic\u306eUUID\u304c2a4d\u3060\u3068\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u305d\u3057\u3066\u305d\u306e\u4e0b\u306b\u3001Readable\u3068Supports notifications\u306e\u6240\u306b\u30c1\u30a7\u30c3\u30af\u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001Property\u306bread \u3068 Notify \u304c\u3042\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u3053\u3053\u307e\u3067\u308f\u304b\u308c\u3070\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u89e3\u8aac<\/h2>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-python\"><code class=\"language-python\">import asyncio\nimport aioble\nimport bluetooth\nimport machine\nimport binascii\n\nLED = machine.Pin(\"LED\", machine.Pin.OUT)\nSWITCH = machine.Pin(0, machine.Pin.OUT)\n\n# \u30c0\u30a4\u30bd\u30fc\u306eBluetooth\u306e\u30dc\u30bf\u30f3\u60c5\u5831\n# \u7686\u69d8\u306e\u30dc\u30bf\u30f3\u30c7\u30d0\u30a4\u30b9\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u3057\u3066\u304f\u305f\u3099\u3055\u3044\n# \u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092Thonny\u4e0a\u3067\u5b9f\u884c\u3059\u308b\u3068\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u753b\u9762\u306b\u3001\u30c7\u30d0\u30a4\u30b9\u60c5\u5831\u304c\u51fa\u3066\u304d\u307e\u3059\u3002\n# \u305d\u306e\u4e2d\u304b\u3089\u30c7\u30d0\u30a4\u30b9\u540d\u304c\u300cBT Shutter\u300d\u7684\u306a\u3082\u306e\u3092\u3055\u304c\u3057\u3066\u3001\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3092\u63a2\u3057\u3066\u304f\u305f\u3099\u3055\u3044\u3002\n_ENV_DEVICE_BUTTON = \"xx:xx:xx:xx:xx:xx\"\n\n# Human Interface Device service \n_ENV_BUTTON_SERVICE_UUID = bluetooth.UUID(0x1812)\n# Report :read,notify\n_ENV_BUTTON_CHARACTERICTIC_UUID = bluetooth.UUID(0x2A4D)\n<\/code><\/pre>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">MycroPython\u306b\u306faioble\u3068\u3044\u3046Bluetooth\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u4fbf\u5229\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">aioble\u3068bluetooth\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u4e0b\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u5148\u7a0b\u8abf\u3079\u305f\u3001\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3068\u3001Service\u306eUUID\u3001Characteristic\u306eUUID\u3092\u5b9a\u6570\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-7-1024x576.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u30e1\u30a4\u30f3\u51e6\u7406\u306e\u6d41\u308c\u306f\u3001<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Bluetooth\u30c7\u30d0\u30a4\u30b9\u306e\u30b9\u30ad\u30e3\u30f3<\/li>\n\n\n\n<li>DeviceConnection\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b<\/li>\n\n\n\n<li>ClientService\u3092\u53d6\u5f97\u3059\u308b<\/li>\n\n\n\n<li>characteristic\u3092\uff08\u8907\u6570\uff09\u53d6\u5f97\u3059\u308b<\/li>\n\n\n\n<li>\u30dc\u30bf\u30f3\u901a\u77e5\u3092\u767b\u9332\u3059\u308b<\/li>\n\n\n\n<li>\u30dc\u30bf\u30f3\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b<\/li>\n<\/ol>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u5177\u4f53\u7684\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3053\u3046\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-python\"><code class=\"language-python\">async def main():\n    while True:\n        LED.on()\n        SWITCH.off()\n        try:\n            # Bluetooth\u30c7\u30d0\u30a4\u30b9\u306e\u30b9\u30ad\u30e3\u30f3\n            await scan_for_button()\n            # DeviceConnection\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b\n            deviceConnection = await connect()\n            print(\"Connected to device:\",deviceConnection)\n\n            # ClientService\u3092\u53d6\u5f97\u3059\u308b\n            button_clientService = await deviceConnection.service(_ENV_BUTTON_SERVICE_UUID)\n            print(\"get the Button client service:\",button_clientService)\n\n            # characteristic\u3092\uff08\u8907\u6570\uff09\u53d6\u5f97\u3059\u308b\n            button_characteristics = await get_characteristics(button_clientService)\n            print(\"get the Button characteristics:\",button_characteristics)\n\n            # \u30dc\u30bf\u30f3\u901a\u77e5\u3092\u767b\u9332\u3059\u308b\n            await subscribe_button(button_characteristics)\n            LED.off()\n\n            # \u30dc\u30bf\u30f3\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\n            await button_notified(button_characteristics)\n        except Exception as e:\n            print(e)\n        finally:\n            disconnect(deviceConnection)\n\nasyncio.run(main())<\/code><\/pre>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u5404\u95a2\u6570\u306e\u4e2d\u8eab\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-python\"><code class=\"language-python\"># Bluetooth\u30c7\u30d0\u30a4\u30b9\u306e\u30b9\u30ad\u30e3\u30f3(\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u306e\u8abf\u67fb)\nasync def scan():\n    devices = []\n    async with aioble.scan(duration_ms=1000) as scanner:\n        async for result in scanner:\n            devices.append(result)\n    return devices\n\n# \u30dc\u30bf\u30f3\u30c7\u30d0\u30a4\u30b9\u304c\u3042\u308b\u304b\u898b\u3064\u304b\u308b\u307e\u3067\u30eb\u30fc\u30d7\u3055\u305b\u308b\u95a2\u6570\nasync def scan_for_button():\n    while True:\n        device_address = []\n        try:\n            devices = await scan()\n        except asyncio.TimeoutError:\n            print('Timeout')\n        for d in devices:\n            addr = binascii.hexlify(d.device.addr, ':').decode('utf-8')\n            device_address.append(addr)\n            print(f\"Device: {d.name()} address: {addr}\")\n        if _ENV_DEVICE_BUTTON in device_address:\n            break<\/code><\/pre>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Scan\u95a2\u6570\u306e\u4e2d\u3067\u3001Advertise\u3055\u308c\u3066\u3044\u308bPeripheral\u306e\u96fb\u6ce2\u3092scan\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u3057\u3066\u30ad\u30e3\u30c3\u30c1\u3057\u305f\u500b\u3005\u306ePeripheral\u306e\u60c5\u5831\u3092devides\u30ea\u30b9\u30c8\u306b\u683c\u7d0d\u3057\u3066\u30ea\u30bf\u30fc\u30f3\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">scan_for_button\u95a2\u6570\u306e\u4e2d\u3067\u3001scan\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u60c5\u5831\u3068\u3001BT Shutter \u306e\u30c7\u30d0\u30a4\u30b9\u756a\u53f7\u3092\u7a81\u304d\u5408\u308f\u305b\u3066\u3001\u30c7\u30d0\u30a4\u30b9\u60c5\u5831\u306bBT Shutter\u304c\u542b\u307e\u308c\u3066\u3044\u305f\u3089\u30eb\u30fc\u30d7\u3092\u629c\u3051\u3066\u95a2\u6570\u3092\u7d42\u4e86\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-python\"><code class=\"language-python\">Bluetooth\u30c7\u30d0\u30a4\u30b9\u3068\u63a5\u7d9a\nasync def connect():\n    # Connect with known address\n    device = aioble.Device(aioble.ADDR_PUBLIC, _ENV_DEVICE_BUTTON)\n    try:\n        connection = await device.connect(timeout_ms=2000)\n    except asyncio.TimeoutError:\n        print('Timeout')\n    return connection\n\n#Bluetooth\u30c7\u30d0\u30a4\u30b9\u3068\u5207\u65ad\nasync def disconnect(deviceConnection):\n    await deviceConnection.disconnect(timeout_ms=2000)\n<\/code><\/pre>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">connect\u95a2\u6570\u306b\u3088\u308a\u3001PicoW\u3064\u307e\u308aCentral\u3068\u3001\u30dc\u30bf\u30f3\u3064\u307e\u308aPeripheral\u3068\u3092\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u30d7\u30ed\u30b0\u30e9\u30e0\u7d42\u4e86\u6642\u306b\u306f\u3001\u30c7\u30d0\u30a4\u30b9\u3092\u5207\u65ad\u3057\u306a\u304f\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u306e\u3067\u3001disconnect\u95a2\u6570\u3082\u7528\u610f\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-python\"><code class=\"language-python\"># characteristic\u3092\uff08\u8907\u6570\uff09\u53d6\u5f97\u3059\u308b\nasync def get_characteristics(button_clientService):\n    button_characteristics = []\n    async for characteristic in button_clientService.characteristics(_ENV_BUTTON_CHARACTERICTIC_UUID, timeout_ms=2000):\n        if characteristic.uuid == _ENV_BUTTON_CHARACTERICTIC_UUID:\n            button_characteristics.append(characteristic)\n    return button_characteristics\n\n# \u30dc\u30bf\u30f3\u901a\u77e5\u3092\u767b\u9332\u3059\u308b\nasync def subscribe_button(button_characteristics):\n    for c in button_characteristics:\n        await c.subscribe(notify=True)\n<\/code><\/pre>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">get_characteristics\u95a2\u6570\u3067\u3001Characteristic\u3092\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002Characteristic\u306f\u4eca\u56de\u306f\u3001\u540c\u4e00UUID\u3067\uff12\u3064\u5b58\u5728\u3057\u3066\u3044\u307e\u3057\u305f\u306e\u3067\u3001\u8907\u6570\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">subscribe_button\u95a2\u6570\u3067\u3001\u5148\u7a0b\u53d6\u5f97\u3057\u305fCharacteristic\u306b\u5bfe\u3057\u3001notify\u306e\u30b5\u30d6\u30b9\u30af\u30e9\u30a4\u30d6\u3064\u307e\u308a\u8cfc\u8aad\u767b\u9332\u3092\u3057\u307e\u3059\u3002\u3053\u308c\u3067\u3001\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u3068\u304d\u3068\u3001\u96e2\u3055\u308c\u305f\u6642\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u901a\u77e5\u304c\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u6ce8\u610f\u70b9\u306f\u3001\u540c\u4e00UUID\u3067\u8907\u6570\u306eCharacteristic\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3089\u5168\u3066\u306b\u5bfe\u3057\u3001Notify\u767b\u9332\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-python\"><code class=\"language-python\"># \u30dc\u30bf\u30f3\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\nasync def button_notified(button_characteristics):\n    while True:\n        # \u30dc\u30bf\u30f3\u901a\u77e5\u3092\u53d7\u3051\u53d6\u308b\n        data = await button_characteristics[0].notified()\n        print(data)\n        if data == b'\\x00\\x00':\n            # \u30dc\u30bf\u30f3\u3092\u96e2\u3057\u305f\n            LED.off()\n            SWITCH.off()\n        else:\n            # \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\n            LED.on()\n            SWITCH.on<\/code><\/pre>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">button_notified\u95a2\u6570\u306e\u4e2d\u3067\u6c38\u4e45\u30eb\u30fc\u30d7\u3055\u305b\u3066\u3001\u30dc\u30bf\u30f3\u304b\u3089\u306eNotify\u3092\u5f85\u3061\u53d7\u3051\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u72b6\u614b\u5909\u5316\u304c\u3042\u3063\u305f\u6642\u306b\u306f\u3001\u305d\u308c\u306b\u898b\u5408\u3063\u305f\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\u30dc\u30bf\u30f3\u304c\u96e2\u3055\u308c\u305f\u6642\u306b\u306f\u300100\u3068\u3044\u3046\u30c7\u30fc\u30bf\u304cNotify\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3092\u53d7\u3051\u3001\u3053\u3053\u3067\u306fLED\u3092\u6d88\u706f\u3055\u305b\u3066\u3044\u307e\u3059\u3002\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u6642\u306b\u306f\u300100\u4ee5\u5916\u306e\u30c7\u30fc\u30bf\u304cNotify\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u305d\u308c\u3092\u53d7\u3051\u3001\u3053\u3053\u3067\u306fLED\u3092\u70b9\u706f\u3055\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u4ee5\u4e0a\u304c\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u89e3\u8aac\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3092\u4f7f\u3063\u305f\u5fdc\u7528\u4f5c\u54c1\u306e\u30c7\u30e2\u52d5\u753b<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u3053\u308c\u3092\u5fdc\u7528\u3059\u308b\u3068\u3001\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3067\u3001\u8272\u3005\u306a\u3082\u306e\u3092\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/tanep.work\/tanech\/wp-content\/uploads\/2025\/06\/image-1-1024x576.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">\u4eca\u56de\u306f\u4ee5\u524d\u306e\u52d5\u753b\u3067\u4f5c\u3063\u305f\u3001\u30a2\u30d2\u30eb\u6247\u98a8\u6a5f\u306e\u697d\u5668\u3092\u30d6\u30eb\u30fc\u30c8\u30a5\u30fc\u30b9\u30dc\u30bf\u30f3\u3067\u52d5\u304b\u3059\u3088\u3046\u306b\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-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"\u3010Bluetooth\u306e\u4f7f\u3044\u65b9\u3011Bluetooth\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u30dc\u30bf\u30f3\u3068Raspberry Pi PICO W \u306e\u63a5\u7d9a\u306e\u4ed5\u65b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3010\u96fb\u5b50\u5de5\u4f5c\u5165\u9580\u3011\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/DrwTmrqhjnc?start=710&#038;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 class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><a href=\"https:\/\/youtu.be\/snACTrOwFQk?si=YP2O72wCC6WjoI54\">https:\/\/youtu.be\/snACTrOwFQk?si=YP2O72wCC6WjoI54<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Wifi\u3068\u30b9\u30de\u30db\u3092\u9023\u643a\u3055\u305b\u3066\u30b9\u30de\u30db\u3092\u30ea\u30e2\u30b3\u30f3\u3068\u3057\u3066\u4f7f\u3046\u306e\u3082\u826f\u3044\u306e\u3067\u3059\u304c\u3001Wifi\u306e\u7121\u3044\u6240\u3067\u306f\u305d\u308c\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u3067\u3059\u304c\u3001\u3053\u306eBluetooth\u3092\u4f7f\u3048\u3070\u3001Wifi\u306e\u7121\u3044\u6240\u3067\u3082\u30ea\u30e2\u30fc\u30c8\u3067\u30e2\u30ce\u3092\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u6700\u8fd1\u3067\u306f\u5b89\u4fa1\u306aBluetooth\u88fd\u54c1\u304c\u5897\u3048\u3066\u304d\u307e\u3057\u305f\u3002\u3053\u308c\u306b\u3088\u308a\u3001PicoW\u306e\u5fdc\u7528\u6d3b\u7528\u306e\u53ef\u80fd\u6027\u3082\u304b\u306a\u308a\u5e83\u304c\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>PICO W \u516c\u5f0f\u30da\u30fc\u30b8<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.raspberrypi.com\/documentation\/microcontrollers\/raspberry-pi-pico.html\">https:\/\/www.raspberrypi.com\/documentation\/microcontrollers\/raspberry-pi-pico.html<\/a><\/p>\n\n\n\n<h5 class=\"wp-block-heading has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>\u6700\u65b0MicroPython\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8<\/strong><\/h5>\n\n\n\n<p><a href=\"https:\/\/www.raspberrypi.com\/documentation\/microcontrollers\/micropython.html#drag-and-drop-micropython\">https:\/\/www.raspberrypi.com\/documentation\/microcontrollers\/micropython.html#drag-and-drop-micropython<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>\u30de\u30a4\u30af\u30ed\u30d1\u30a4\u30bd\u30f3 \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 Bluetooth<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.micropython.org\/en\/latest\/library\/bluetooth.html\">https:\/\/docs.micropython.org\/en\/latest\/library\/bluetooth.html<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>bluetooth\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08\u65e5\u672c\u8a9e\u516c\u5f0f\uff09<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/micropython-docs-ja.readthedocs.io\/ja\/latest\/library\/bluetooth.html\">https:\/\/micropython-docs-ja.readthedocs.io\/ja\/latest\/library\/bluetooth.html<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>aioble \u30e9\u30a4\u30d6\u30e9\u30ea<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/micropython\/micropython-lib\/tree\/master\/micropython\/bluetooth\/aioble\">https:\/\/github.com\/micropython\/micropython-lib\/tree\/master\/micropython\/bluetooth\/aioble<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>\u30de\u30a4\u30af\u30ed\u30d1\u30a4\u30bd\u30f3 Bluetooth GitHub\u30ea\u30dd\u30b8\u30c8\u30ea<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/micropython\/micropython\/tree\/master\/examples\/bluetooth\">https:\/\/github.com\/micropython\/micropython\/tree\/master\/examples\/bluetooth<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>Bluetooth UUID\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.bluetooth.com\/specifications\/assigned-numbers\/\">https:\/\/www.bluetooth.com\/specifications\/assigned-numbers\/<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>Human Interface Device Service 1.0 documents<\/strong><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">&nbsp;<a href=\"https:\/\/www.bluetooth.com\/specifications\/specs\/human-interface-device-service-1-0\/\">https:\/\/www.bluetooth.com\/specifications\/specs\/human-interface-device-service-1-0\/<\/a><\/p>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u6982\u8981 100\u5186\u30b7\u30e7\u30c3\u30d7\u3067\u3053\u3093\u306a\u88fd\u54c1\u826f\u304f\u58f2\u3089\u308c\u3066\u3044\u307e\u3059\u3088\u306d\u3002 Bluetooth\u3067\u30b9\u30de\u30db\u306b\u63a5\u7d9a\u3057\u3066\u3001\u30ab\u30e1\u30e9\u306e\u30b7\u30e3\u30c3\u30bf\u30fc\u3092\u30ea\u30e2\u30fc\u30c8\u3067\u62bc\u305b\u308b\u88fd\u54c1\u3067\u3059\u3002 Raspberry Pi Pico W \u306fBluetooth [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":598,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[28,29,11],"class_list":["post-581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-introduction_electronic","tag-bluetooth","tag-raspberry-pi-pico-w","tag-electronic_work"],"_links":{"self":[{"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/posts\/581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/comments?post=581"}],"version-history":[{"count":12,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/posts\/581\/revisions"}],"predecessor-version":[{"id":603,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/posts\/581\/revisions\/603"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/media\/598"}],"wp:attachment":[{"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/media?parent=581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/categories?post=581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tanep.work\/tanech\/wp-json\/wp\/v2\/tags?post=581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}