{"id":3745,"date":"2018-07-18T11:51:04","date_gmt":"2018-07-18T02:51:04","guid":{"rendered":"http:\/\/www.ois-yokohama.co.jp\/oisblog\/?p=3745"},"modified":"2019-02-12T11:11:57","modified_gmt":"2019-02-12T02:11:57","slug":"mbed-%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f%e3%83%ad%e3%83%9c%e3%83%83%e3%83%88%e4%bd%9c%e6%88%90-%e7%ac%ac4%e5%9b%9e","status":"publish","type":"post","link":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/archives\/3745","title":{"rendered":"mbed \u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210 \u7b2c4\u56de"},"content":{"rendered":"<div class=\"veu_autoEyeCatchBox\"><img loading=\"lazy\" decoding=\"async\" width=\"664\" height=\"507\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-01.png\" class=\"attachment-large size-large wp-post-image\" alt=\"\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-01.png 664w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-01-300x229.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/div>\n<h1><strong>BLE\uff08Bluetooth Low Energy)\u3092\u4f7f\u3063\u305f\u30ea\u30e2\u30b3\u30f3\u3092\u4f5c\u3063\u3066\u307f\u308b<\/strong><\/h1>\n<p>&nbsp;<\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3068\u3044\u3046\u9023\u8f09\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u30ed\u30dc\u30c3\u30c8\u306e\u982d\u8133\u3068\u306a\u308b\u90e8\u5206\u3092\u3069\u3046\u3059\u308b\u304b\u3092\u73fe\u5728\u60a9\u3093\u3067\u3044\u307e\u3059\u3002<br \/>\n\u4eca\u6642\u306e\u6280\u8853\u3092\u4f7f\u3046\u306a\u3089\u3070\u3001<strong>AI<\/strong>\u3068\u304b\u306b\u306a\u308b\u3093\u3067\u3057\u3087\u3046\u3051\u3069\u3001\u5229\u7528\u3059\u308b\u306b\u3042\u305f\u308a\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u304c\u524d\u63d0\u306b\u306a\u308b\u306e\u3067\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u4f7f\u3048\u306a\u3044 \u30ed\u30dc\u30c3\u30c8\u5358\u4f53\u3067\u52d5\u4f5c\u3059\u308b\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30fc\u30f3\u72b6\u614b\u3067\u306f\u3001\u81ea\u5f8b\u7684\u306b\u52d5\u4f5c\u3067\u304d\u308b\u65b9\u304c\u3044\u3044\u306e\u304b\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u5834\u5408\u3001\u30ed\u30dc\u30c3\u30c8\u672c\u4f53\u306b\u305d\u3053\u305d\u3053\u306e\u30b9\u30da\u30c3\u30af\u304c\u6c42\u3081\u3089\u308c\u3001\u500b\u4eba\u3067\u958b\u767a\u3059\u308b\u306e\u306f\u5927\u5206\u53b3\u3057\u3044\u306a\u3041\u3068\u601d\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u3002<br \/>\n\u6700\u7d42\u5f62\u614b\u3092\u3069\u3046\u3059\u308b\u304b\u306f\u5148\u9001\u308a\u306b\u3057\u3066\u5c11\u3057\u8a66\u3057\u3066\u307f\u305f\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u305d\u308c\u306f\u3001<strong>\u30ed\u30dc\u30c3\u30c8\u3092\u7121\u7dda\u3067\u30ea\u30e2\u30b3\u30f3\u52d5\u4f5c\u3055\u305b\u308b<\/strong>\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\n\u5e78\u3044\u3001\u73fe\u5728\u4f7f\u7528\u3057\u3066\u3044\u308bmbed\u306e\u30de\u30a4\u30b3\u30f3\u30dc\u30fc\u30c9\u306b\u306f\u7a7a\u304d\u30dd\u30fc\u30c8\u304c\u3042\u308b\u306e\u3067\u3001\u300c\u3053\u3053\u306b\u7121\u7dda\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u63a5\u7d9a\u3059\u308c\u3070\u3001\u306a\u3093\u3068\u304b\u901a\u4fe1\u3067\u304d\u308b\u306f\u305a\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u59cb\u3081\u3066\u307f\u307e\u3059\u3002<br \/>\n\u672c\u683c\u7684\u306f\u7121\u7dda\u901a\u4fe1\u3092\u3059\u308b\u306b\u306f\u3001\u30e9\u30b8\u30b3\u30f3\u306e\u30d7\u30ed\u30dd\u307f\u305f\u3044\u306a\u306e\u304c\u5fc5\u8981\u3067\u3057\u3087\u3046\u304c\u3001<br \/>\n\u30de\u30a4\u30b3\u30f3\u3068\u3044\u3046\u7701\u96fb\u529b\u30fb\u7701\u30b9\u30da\u30fc\u30b9\u304c\u6c42\u3081\u3089\u308c\u308b\u74b0\u5883\u3067\u9069\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u3092\u8abf\u3079\u3066\u307f\u308b\u3068\u3001BLE\uff08Bluetooth Low Energy\uff09\u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u5f15\u3063\u639b\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\n\u3053\u306eBLE\u3092\u4f7f\u3044\u30de\u30a4\u30b3\u30f3\u3068\u7121\u7dda\u901a\u4fe1\u3059\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3057\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>BLE\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066<\/h2>\n<p>BLE\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u6570\u591a\u304f\u51fa\u3066\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u4f7f\u7528\u3059\u308b\u306e\u306f\u3001\u6bd4\u8f03\u7684\u5236\u5fa1\u304c\u7c21\u5358\u306a\u6d45\u8349\u30ae\u7814\u306eBLESerial3\u3068\u3044\u3046\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<table border=\"1\" width=\"100%\">\n<tbody>\n<tr>\n<td>\u88fd\u54c1\u540d<\/td>\n<td>BLESerial3<\/td>\n<\/tr>\n<tr>\n<td>\u30e1\u30fc\u30ab\u30fc<\/td>\n<td>\u6d45\u8349\u30ae\u7814<\/td>\n<\/tr>\n<tr>\n<td>\u578b\u756a<\/td>\n<td>Bluetooth 4.0 Smart<\/td>\n<\/tr>\n<tr>\n<td>\u6982\u8981<\/td>\n<td>\u30fbSSID\u306e\u5207\u308a\u66ff\u3048\u304c16\u7a2e\u985e\u3042\u308b\u30fbiPhone\u53ca\u3073Android\u3068\u901a\u4fe1\u53ef\u80fd\u30fb3.3V\u306eUART\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<\/td>\n<\/tr>\n<tr>\n<td>\u5024\u6bb5<\/td>\n<td>4,320\u5186<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>BLESerial3\u306e\u901a\u4fe1\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3068\u306a\u308bUART\u306e\u30dd\u30fc\u30c8\u3092\u30de\u30a4\u30b3\u30f3\u306b\u63a5\u7d9a\u3057\u3001\u96fb\u6e90\u3092\u4f9b\u7d66\u3059\u308c\u3070\u3001\u7c21\u5358\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3756 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-01.png\" alt=\"\" width=\"664\" height=\"507\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-01.png 664w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-01-300x229.png 300w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><br \/>\nmbed\u3068\u306e\u63a5\u7d9a\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a<\/p>\n<pre class=\"toolbar-overlay:false show-title:false striped:false marking:false lang:default highlight:0 decode:true \">----------------------------+              +-------------+\r\n mbed stm32 NUCLEO-F401RE   |              | BLE Serial3 |\r\n                (UART6Rx)PC7|+-------------+T            |\r\n                (UART6Tx)PC6|+-------------+R            |\r\n                            |\u3000\u3000 \u3000\u30003.3v--+3            |\r\n                            |         GND--+G\u3000          |\r\n----------------------------+              +-------------+\r\n<\/pre>\n<p>BLE Serial3\u306eT\u30dd\u30fc\u30c8\u3092\u30de\u30a4\u30b3\u30f3\u306eUART6\u306eRx\u30dd\u30fc\u30c8\u3078\u3001R\u30dd\u30fc\u30c8\u3092UART6\u306eTx\u30dd\u30fc\u30c8\u3078\u63a5\u7d9a\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u3088\u3046\u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3067\u3001\u30de\u30a4\u30b3\u30f3\u3067\u6a19\u6e96\u642d\u8f09\u3055\u3044\u3066\u3044\u308bUART\u3092\u5236\u5fa1\u3059\u308b\u3053\u3068\u3067\u901a\u4fe1\u5236\u5fa1\u304c\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b7\u30b9\u30c6\u30e0\u69cb\u6210\u306b\u3064\u3044\u3066<\/h2>\n<p>\u30b7\u30b9\u30c6\u30e0\u69cb\u6210\u306e\u6982\u7565\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3759 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-02.png\" alt=\"\" width=\"1079\" height=\"611\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-02.png 1079w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-02-300x170.png 300w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-02-768x435.png 768w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-02-1024x580.png 1024w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-02-320x180.png 320w\" sizes=\"auto, (max-width: 1079px) 100vw, 1079px\" \/><br \/>\n\u64cd\u4f5c\u90e8\u3068\u306a\u308b\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306fiPhone\u3092\u4f7f\u3044\u307e\u3059\u3002<br \/>\niPhone\u306eBluetooth\u3068\u30de\u30a4\u30b3\u30f3\u306eBLE Serial3\u3092\u30da\u30a2\u30ea\u30f3\u30b0\u3057\u901a\u4fe1\u53ef\u80fd\u72b6\u614b\u306b\u3057\u307e\u3059\u3002<br \/>\nBT\u3068BLE\u9593\u3067\u30c7\u30fc\u30bf\u901a\u4fe1\u3059\u308b\u3053\u3068\u3067\u30de\u30a4\u30b3\u30f3\u306e\u5236\u5fa1\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u3064\u3044\u3066<\/h2>\n<h3>\u30de\u30a4\u30b3\u30f3\u5074\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u3064\u3044\u3066<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" title=\"main.cpp\">#include \"mbed.h\"\r\n\/* BLE Serial *\/\r\nSerial ble_sport(PC_6, PC_7); \/* ble serial tx, rx *\/\r\n\/* Console *\/\r\nSerial pc(SERIAL_TX, SERIAL_RX);\r\n\/**\r\n * BLE\u306e\u30e1\u30a4\u30f3\u51e6\u7406\r\n *\/\r\nint ble_test()\r\n{\r\n    char ch;\r\n    char szReadBuffer[30];\r\n    int count = 0;\r\npc.printf(\"ble_test\\r\\n\");\r\n\/* UART\u30dd\u30fc\u30c8\u306e\u901a\u4fe1\u8a2d\u5b9a *\/\r\n    ble_sport.format(8,Serial::None,1);\r\n    pc.printf(\"ble_test start\\r\\n\");\r\n    while(1) {\r\n        if(ble_sport.readable()) {    \/* \u53d7\u4fe1\u78ba\u8a8d *\/\r\n            pc.printf(\"###### ble_sport readable!! ########\\r\\n\");\r\n            ch = ble_sport.getc();    \/* 1\u6587\u5b57\u53d6\u308a\u51fa\u3057 *\/\r\n            szReadBuffer[count] = ch;\r\n            pc.printf(\"0x%02X \\r\\n\",ch);\r\n        }\r\n    }\r\n}\r\n\/* main() runs in its own thread in the OS *\/\r\nint main() {\r\n    ble_test();\r\n}<\/pre>\n<p>UART\u3067\u53d7\u4fe1\u3057\u305f\u7d50\u679c\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u51fa\u529b\u3059\u308b\u3068\u3044\u3063\u305f\u5358\u7d14\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>iPhone\u5074\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u3064\u3044\u3066<\/h3>\n<p>\u6b63\u76f4\u3001iPhone\u5074\u306e\u30a2\u30d7\u30ea\u958b\u767a\u306f\u5c02\u9580\u5916\u306a\u306e\u3067\u3001\u8a73\u3057\u3044\u5f8c\u8f29\u306b\u8272\u3005\u3068\u805e\u3044\u305f\u3068\u3053\u308d\u3001\u300cJavaScript\u3067\u5236\u5fa1\u3067\u304d\u307e\u3059\u3088\uff01\u300d\u3068\u30a2\u30c9\u30d0\u30a4\u30b9\u3092\u3082\u3089\u3044\u3001\u8abf\u67fb\u3057\u305f\u3068\u3053\u308d\u3001Web Bluetooth API\u3092\u767a\u898b\u3002<br \/>\nJavaScript\u304b\u3089iPhone\u306eBluetooth\u3092\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u3002<br \/>\n\u4f46\u3057\u3001\u3059\u3079\u3066\u306e\u30d6\u30e9\u30a6\u30b6\u3067\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u3088\u3046\u3067\u3001\u4eca\u56de\u306f\u3001\u4e00\u756a\u52d5\u304d\u304c\u826f\u3044\u30d6\u30e9\u30a6\u30b6\u3067\u3042\u308bWebBLE(\u6709\u6599)\u3092\u4f7f\u3044\u52d5\u304b\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0a\u3088\u308a\u3001\u7c21\u5358\u306a\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<div id=\"attachment_3761\" style=\"width: 366px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-03.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3761\" class=\"wp-image-3761 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-03.png\" alt=\"\u753b\u50cf\u30a4\u30e1\u30fc\u30b8\" width=\"356\" height=\"150\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-03.png 356w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-03-300x126.png 300w\" sizes=\"auto, (max-width: 356px) 100vw, 356px\" \/><\/a><p id=\"caption-attachment-3761\" class=\"wp-caption-text\">\u753b\u50cf\u30a4\u30e1\u30fc\u30b8<\/p><\/div>\n<p>\u203b\u753b\u9762\u306e\u30b3\u30fc\u30c9\u306f\u7c21\u5358\u306aHTML\u306a\u306e\u3067\u5272\u611b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default highlight:0 decode:true \" title=\"JavaScript\">\/**\r\n * \u30b5\u30fc\u30d3\u30b9\u306eUUID\r\n * @type {string}\r\n *\/\r\nconst SERVICE_UUID = \"feed0001-c497-4476-a7ed-727de7648ab1\";\r\n\/**\r\n * \u30ad\u30e3\u30e9\u30af\u30bf\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\u306eUUID\r\n * @type {string}\r\n *\/\r\nconst RX_CHARACTERISTIC_UUID = \"feedaa03-c497-4476-a7ed-727de7648ab1\";\r\nconst TX_CHARACTERISTIC_UUID = \"feedaa02-c497-4476-a7ed-727de7648ab1\";\r\n\/**\r\n * \u53d7\u4fe1\u7528\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\r\n *\/\r\nlet RxCharacteristic;\r\n\/**\r\n * \u9001\u4fe1\u7528\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\r\n *\/\r\nlet TxCharacteristic;\r\n\/**\r\n * BLESerial3\u306b\u63a5\u7d9a\u3059\u308b\r\n *\/\r\nfunction connectBLESerial3() {\r\n  navigator.bluetooth.requestDevice({\r\n    filters: [\r\n      { services: [SERVICE_UUID] }\r\n      ]\r\n    })\r\n    .then(device =&gt; {\r\n      \/* \u9078\u629e\u3057\u305f\u30c7\u30d0\u30a4\u30b9\u306b\u63a5\u7d9a *\/\r\n      return device.gatt.connect();\r\n    })\r\n    .then(server =&gt; {\r\n      \/* UUID\u306b\u5408\u81f4\u3059\u308b\u30b5\u30fc\u30d3\u30b9(\u6a5f\u80fd)\u3092\u53d6\u5f97 *\/\r\n      return server.getPrimaryService(SERVICE_UUID);\r\n    })\r\n    .then(service =&gt; {\r\n      \/* UUID\u306b\u5408\u81f4\u3059\u308b\u30ad\u30e3\u30e9\u30af\u30bf\u30ea\u30b9\u30c6\u30a3\u30c3\u30af(\u30b5\u30fc\u30d3\u30b9\u304c\u6271\u3046\u30c7\u30fc\u30bf)\u3092\u53d6\u5f97 *\/\r\n      return Promise.all([\r\n        service.getCharacteristic(RX_CHARACTERISTIC_UUID),\r\n        service.getCharacteristic(TX_CHARACTERISTIC_UUID)\r\n      ]);\r\n    })\r\n    .then(characteristic =&gt; {\r\n      RxCharacteristic = characteristic[0];\r\n      TxCharacteristic = characteristic[1];\r\n    })\r\n      .catch(error =&gt; {\r\n        console.log(\"Error : \" + error);\r\n    });\r\n}\r\n\/**\r\n * \u30b3\u30de\u30f3\u30c9\u756a\u53f7\u3092\u9001\u4fe1\u3059\u308b\r\n * \u305d\u306e\u5f8c\u3001\u8aad\u307f\u8fbc\u307f\u3092\u884c\u3046\r\n *\/\r\nfunction sendData(cmdnumber){\r\n    let rxValue;\r\n    var sendarray = new Uint8Array( [cmdnumber] );\r\n    TxCharacteristic.writeValue( sendarray );\r\n    alert( \"send data val:\" + cmdnumber + \"\");\r\n}\r\n\/**\r\n * \u4e0a\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickUp(){\r\n    sendData( 1 );\r\n}\r\n\/**\r\n * \u4e0b\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickLeft(){\r\n    sendData( 2 );\r\n}\r\n\/**\r\n * \u5de6\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickLeft(){\r\n    sendData( 3 );\r\n}\r\n\/**\r\n * \u53f3\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickDown(){\r\n    sendData( 4 );\r\n}\r\n\/**\r\n * \u63a5\u7d9a\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickConnect(){\r\n    connectBLESerial3();\r\n}\r\n\/**\r\n * \u25b3\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickSankaku(){\r\n    sendData( 5 );\r\n}\r\n\/**\r\n * \u25a1\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickSikaku(){\r\n    sendData( 6 );\r\n}\r\n\/**\r\n * \u25cb\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickMaru(){\r\n    sendData( 7 );\r\n}\r\n\/**\r\n * \u00d7\u30dc\u30bf\u30f3\u62bc\u4e0b\u51e6\u7406\r\n *\/\r\nfunction onClickBatu(){\r\n    sendData( 8 );\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u5b9f\u884c\u7d50\u679c<\/h2>\n<p>&nbsp;<\/p>\n<table border=\"1\" width=\"100%\">\n<tbody>\n<tr>\n<td>Connect\u30dc\u30bf\u30f3\u62bc\u4e0b<\/td>\n<td>\u25b2\u30dc\u30bf\u30f3\u62bc\u4e0b<\/td>\n<td>\u30de\u30a4\u30b3\u30f3\u5074\u306e\u30b3\u30f3\u30bd\u30fc\u30eb<\/td>\n<\/tr>\n<tr>\n<td>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3765 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-04.png\" alt=\"no4-04\" width=\"637\" height=\"1100\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-04.png 637w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-04-174x300.png 174w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-04-593x1024.png 593w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/td>\n<td>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3766 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-05.png\" alt=\"no4-05\" width=\"639\" height=\"1103\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-05.png 639w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-05-174x300.png 174w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-05-593x1024.png 593w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/td>\n<td>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3767 size-full\" src=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-06.png\" alt=\"no4-06\" width=\"589\" height=\"282\" srcset=\"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-06.png 589w, https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-content\/uploads\/2018\/07\/no4-06-300x144.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/td>\n<\/tr>\n<tr>\n<td>iPhone\u306eBuletooth\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u3066\u30de\u30a4\u30b3\u30f3\u306eBLE\u306b\u63a5\u7d9a\u3002<br \/>\n\u8868\u793a\u3057\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6\u306fWebBLE\u3067\u3059\u3002<\/td>\n<td>\u30dc\u30bf\u30f3\u62bc\u4e0b\u3067\u30b3\u30de\u30f3\u30c9(0x01)\u3092\u9001\u4fe1\u3002\u9001\u4fe1\u5f8c\u3001\u30a2\u30e9\u30fc\u30c8\u3067\u9001\u4fe1\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3002<\/td>\n<td>\u30de\u30a4\u30b3\u30f3\u5074\u3067\u53d7\u4fe1\u3057\u305f\u30b3\u30de\u30f3\u30c9(0x01)\u3092\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u25b2\u30dc\u30bf\u30f3\u62bc\u4e0b\u306e\u7d50\u679c\u306e\u307f\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5225\u306e\u30dc\u30bf\u30f3\u3067\u3082\u30dc\u30bf\u30f3\u6bce\u306e\u30c7\u30fc\u30bf\u53d7\u4fe1\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3053\u3053\u307e\u3067\u51fa\u6765\u3066\u3044\u308c\u3070\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3068\u3057\u3066\u306f\u5341\u5206\u3060\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u5f8c\u306f\u3001\u30b3\u30de\u30f3\u30c9\u306b\u8a72\u5f53\u3059\u308b\u52d5\u304d\u3092\u6c7a\u3081\u3066\u3084\u308c\u3070\u826f\u3044\u3060\u3051\u3068\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3069\u3046\u3044\u3046\u52d5\u304d\u306b\u3059\u308b\u304b\u306f\u3001\u307e\u305f\u5225\u306e\u6a5f\u4f1a\u306b\u8003\u3048\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0a\u3002<\/p>\n<p>\u3010\u524d\u56de\u5206\u3000\u53c2\u8003\u3011<br \/>\n\u30fb<a href=\"http:\/\/www.ois-yokohama.co.jp\/oisblog2018\/archives\/2505\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: bold;\">mbed \u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3000\u7b2c1\u56de<\/span><\/a><br \/>\n\u30fb<a href=\"http:\/\/www.ois-yokohama.co.jp\/oisblog2018\/archives\/3048\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: bold;\">mbed \u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3000\u7b2c2\u56de <\/span><\/a><br \/>\n\u30fb<a href=\"http:\/\/www.ois-yokohama.co.jp\/oisblog2018\/archives\/3578\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: bold;\">mbed \u3092\u4f7f\u3063\u305f\u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3000\u7b2c3\u56de <\/span><\/a><\/p>\n<p style=\"color: #666666;\">\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3000<a style=\"color: #000000;\" href=\"http:\/\/www.ois-yokohama.co.jp\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">http:\/\/www.ois-yokohama.co.jp<\/span><\/a><\/p>\n<p style=\"color: #666666;\">facebook\u3000\u3000\u3000<a style=\"color: #000000;\" href=\"https:\/\/www.facebook.com\/orientalinformationservice\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #000000;\">https:\/\/www.facebook.com\/orientalinformationservice\/<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>BLE\uff08Bluetooth Low Energy)\u3092\u4f7f\u3063\u305f\u30ea\u30e2\u30b3\u30f3\u3092\u4f5c\u3063\u3066\u307f\u308b &nbsp; \u306f\u3058\u3081\u306b \u30ed\u30dc\u30c3\u30c8\u4f5c\u6210\u3068\u3044\u3046\u9023\u8f09\u3067\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u30ed\u30dc\u30c3\u30c8\u306e\u982d\u8133\u3068\u306a\u308b\u90e8\u5206\u3092\u3069\u3046\u3059\u308b\u304b\u3092\u73fe\u5728\u60a9\u3093\u3067\u3044\u307e\u3059\u3002 \u4eca\u6642\u306e\u6280\u8853\u3092\u4f7f\u3046\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3756,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"vkexunit_cta_each_option":"","footnotes":""},"categories":[106,13,6],"tags":[197,591,105],"class_list":["post-3745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-106","category-13","category-engineer","tag-ai","tag-ble","tag-mbed"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/3745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/comments?post=3745"}],"version-history":[{"count":3,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/3745\/revisions"}],"predecessor-version":[{"id":5665,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/posts\/3745\/revisions\/5665"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/media\/3756"}],"wp:attachment":[{"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/media?parent=3745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/categories?post=3745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ois-yokohama.co.jp\/oisblog2018\/wp-json\/wp\/v2\/tags?post=3745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}