![](/media/cache/profiles/8c458fc1ed9bb89c1cd16889cb7e7e68.jpg.50x50_q85.png)
RCBControllerでモータを制御します。うおーるぼっとも動かせました。
Dependencies: BLE_API TB6612FNG2 mbed nRF51822
Fork of BLE_RCBController2 by
うまく接続できない時は、iPhone/iPadのBluetoothをOFF->ONしてキャッシュをクリアしてみてください。
ライブラリ類をUpdateするとコンパイル出来なくなります。インポートした物をそのまま使って下さい。
RCBControllerでうおーるぼっとを操縦する例
RCBControllerでの操縦は次の4種類あります。 それぞれうおーるぼっとの動きが異なりますので試してみてください。
- 左十字ボタン
- 左のみアナログ
- 右のみアナログ
- 両方アナログ
うおーるぼっと(LPC1768のソケット)とHRM1017の接続はこれです。
LPC1768 ー HRM1017
p11 ーーー P0_0
p12 ーーー P0_1
p13 ーーー P0_28
p14 ーーー P0_29
p21 ーーー P0_30
p22 ーーー P0_25
GND ーーー GND
HRM1017の電源はうおーるぼっとのUSBコネクタからとります。
nRF51822/nordic/nrf-sdk/s110/ble_ranges.h@1:48f6e08a3ac2, 2014-08-20 (annotated)
- Committer:
- jksoft
- Date:
- Wed Aug 20 13:24:20 2014 +0000
- Revision:
- 1:48f6e08a3ac2
2014.08.20?????BLE?????????????; ???mbed?????????????????; mbed HRM1017; Nordic nRF51822
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 1:48f6e08a3ac2 | 1 | /* |
jksoft | 1:48f6e08a3ac2 | 2 | Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. |
jksoft | 1:48f6e08a3ac2 | 3 | |
jksoft | 1:48f6e08a3ac2 | 4 | The information contained herein is confidential property of Nordic Semiconductor. The use, |
jksoft | 1:48f6e08a3ac2 | 5 | copying, transfer or disclosure of such information is prohibited except by express written |
jksoft | 1:48f6e08a3ac2 | 6 | agreement with Nordic Semiconductor. |
jksoft | 1:48f6e08a3ac2 | 7 | */ |
jksoft | 1:48f6e08a3ac2 | 8 | /** |
jksoft | 1:48f6e08a3ac2 | 9 | @addtogroup BLE_COMMON |
jksoft | 1:48f6e08a3ac2 | 10 | @{ |
jksoft | 1:48f6e08a3ac2 | 11 | @defgroup ble_ranges Module specific SVC and event number subranges |
jksoft | 1:48f6e08a3ac2 | 12 | @{ |
jksoft | 1:48f6e08a3ac2 | 13 | |
jksoft | 1:48f6e08a3ac2 | 14 | @brief Definition of SVC and event number subranges for each API module. |
jksoft | 1:48f6e08a3ac2 | 15 | |
jksoft | 1:48f6e08a3ac2 | 16 | @note |
jksoft | 1:48f6e08a3ac2 | 17 | SVCs and event numbers are split into subranges for each API module. |
jksoft | 1:48f6e08a3ac2 | 18 | Each module receives its entire allocated range of SVC calls, whether implemented or not, |
jksoft | 1:48f6e08a3ac2 | 19 | but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range. |
jksoft | 1:48f6e08a3ac2 | 20 | |
jksoft | 1:48f6e08a3ac2 | 21 | Note that the symbols BLE_<module>_SVC_LAST is the end of the allocated SVC range, |
jksoft | 1:48f6e08a3ac2 | 22 | rather than the last SVC function call actually defined and implemented. |
jksoft | 1:48f6e08a3ac2 | 23 | |
jksoft | 1:48f6e08a3ac2 | 24 | Specific SVC and event values are defined in each module's ble_<module>.h file, |
jksoft | 1:48f6e08a3ac2 | 25 | which defines names of each individual SVC code based on the range start value. |
jksoft | 1:48f6e08a3ac2 | 26 | */ |
jksoft | 1:48f6e08a3ac2 | 27 | |
jksoft | 1:48f6e08a3ac2 | 28 | #ifndef BLE_RANGES_H__ |
jksoft | 1:48f6e08a3ac2 | 29 | #define BLE_RANGES_H__ |
jksoft | 1:48f6e08a3ac2 | 30 | |
jksoft | 1:48f6e08a3ac2 | 31 | #define BLE_SVC_BASE 0x60 |
jksoft | 1:48f6e08a3ac2 | 32 | #define BLE_SVC_LAST 0x6B /* Total: 12. */ |
jksoft | 1:48f6e08a3ac2 | 33 | |
jksoft | 1:48f6e08a3ac2 | 34 | #define BLE_RESERVED_SVC_BASE 0x6C |
jksoft | 1:48f6e08a3ac2 | 35 | #define BLE_RESERVED_SVC_LAST 0x6F /* Total: 4. */ |
jksoft | 1:48f6e08a3ac2 | 36 | |
jksoft | 1:48f6e08a3ac2 | 37 | #define BLE_GAP_SVC_BASE 0x70 |
jksoft | 1:48f6e08a3ac2 | 38 | #define BLE_GAP_SVC_LAST 0x8F /* Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 39 | |
jksoft | 1:48f6e08a3ac2 | 40 | #define BLE_GATTC_SVC_BASE 0x90 |
jksoft | 1:48f6e08a3ac2 | 41 | #define BLE_GATTC_SVC_LAST 0x9F /* Total: 16. */ |
jksoft | 1:48f6e08a3ac2 | 42 | |
jksoft | 1:48f6e08a3ac2 | 43 | #define BLE_GATTS_SVC_BASE 0xA0 |
jksoft | 1:48f6e08a3ac2 | 44 | #define BLE_GATTS_SVC_LAST 0xAF /* Total: 16. */ |
jksoft | 1:48f6e08a3ac2 | 45 | |
jksoft | 1:48f6e08a3ac2 | 46 | #define BLE_L2CAP_SVC_BASE 0xB0 |
jksoft | 1:48f6e08a3ac2 | 47 | #define BLE_L2CAP_SVC_LAST 0xBF /* Total: 16. */ |
jksoft | 1:48f6e08a3ac2 | 48 | |
jksoft | 1:48f6e08a3ac2 | 49 | |
jksoft | 1:48f6e08a3ac2 | 50 | #define BLE_EVT_INVALID 0x00 |
jksoft | 1:48f6e08a3ac2 | 51 | |
jksoft | 1:48f6e08a3ac2 | 52 | #define BLE_EVT_BASE 0x01 |
jksoft | 1:48f6e08a3ac2 | 53 | #define BLE_EVT_LAST 0x0F /* Total: 15. */ |
jksoft | 1:48f6e08a3ac2 | 54 | |
jksoft | 1:48f6e08a3ac2 | 55 | #define BLE_GAP_EVT_BASE 0x10 |
jksoft | 1:48f6e08a3ac2 | 56 | #define BLE_GAP_EVT_LAST 0x2F /* Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 57 | |
jksoft | 1:48f6e08a3ac2 | 58 | #define BLE_GATTC_EVT_BASE 0x30 |
jksoft | 1:48f6e08a3ac2 | 59 | #define BLE_GATTC_EVT_LAST 0x4F /* Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 60 | |
jksoft | 1:48f6e08a3ac2 | 61 | #define BLE_GATTS_EVT_BASE 0x50 |
jksoft | 1:48f6e08a3ac2 | 62 | #define BLE_GATTS_EVT_LAST 0x6F /* Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 63 | |
jksoft | 1:48f6e08a3ac2 | 64 | #define BLE_L2CAP_EVT_BASE 0x70 |
jksoft | 1:48f6e08a3ac2 | 65 | #define BLE_L2CAP_EVT_LAST 0x8F /* Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 66 | |
jksoft | 1:48f6e08a3ac2 | 67 | #define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */ |
jksoft | 1:48f6e08a3ac2 | 68 | |
jksoft | 1:48f6e08a3ac2 | 69 | #define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */ |
jksoft | 1:48f6e08a3ac2 | 70 | #define BLE_OPT_LAST 0x1F /**< Total: 31. */ |
jksoft | 1:48f6e08a3ac2 | 71 | |
jksoft | 1:48f6e08a3ac2 | 72 | #define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */ |
jksoft | 1:48f6e08a3ac2 | 73 | #define BLE_GAP_OPT_LAST 0x3F /**< Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 74 | |
jksoft | 1:48f6e08a3ac2 | 75 | #define BLE_GATTC_OPT_BASE 0x40 /**< GATTC BLE Option base. */ |
jksoft | 1:48f6e08a3ac2 | 76 | #define BLE_GATTC_OPT_LAST 0x5F /**< Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 77 | |
jksoft | 1:48f6e08a3ac2 | 78 | #define BLE_GATTS_OPT_BASE 0x60 /**< GATTS BLE Option base. */ |
jksoft | 1:48f6e08a3ac2 | 79 | #define BLE_GATTS_OPT_LAST 0x7F /**< Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 80 | |
jksoft | 1:48f6e08a3ac2 | 81 | #define BLE_L2CAP_OPT_BASE 0x80 /**< L2CAP BLE Option base. */ |
jksoft | 1:48f6e08a3ac2 | 82 | #define BLE_L2CAP_OPT_LAST 0x9F /**< Total: 32. */ |
jksoft | 1:48f6e08a3ac2 | 83 | |
jksoft | 1:48f6e08a3ac2 | 84 | #endif /* BLE_RANGES_H__ */ |
jksoft | 1:48f6e08a3ac2 | 85 | |
jksoft | 1:48f6e08a3ac2 | 86 | /** |
jksoft | 1:48f6e08a3ac2 | 87 | @} |
jksoft | 1:48f6e08a3ac2 | 88 | @} |
jksoft | 1:48f6e08a3ac2 | 89 | */ |