![](/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コネクタからとります。
Diff: HRM1017/nordic/nrf-sdk/s110/ble_ranges.h
- Revision:
- 4:ebda47d22091
- Parent:
- 1:48f6e08a3ac2
diff -r 9a2487262bb2 -r ebda47d22091 HRM1017/nordic/nrf-sdk/s110/ble_ranges.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HRM1017/nordic/nrf-sdk/s110/ble_ranges.h Wed Aug 20 13:41:01 2014 +0000 @@ -0,0 +1,89 @@ +/* + Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. + + The information contained herein is confidential property of Nordic Semiconductor. The use, + copying, transfer or disclosure of such information is prohibited except by express written + agreement with Nordic Semiconductor. + */ +/** + @addtogroup BLE_COMMON + @{ + @defgroup ble_ranges Module specific SVC and event number subranges + @{ + + @brief Definition of SVC and event number subranges for each API module. + + @note + SVCs and event numbers are split into subranges for each API module. + Each module receives its entire allocated range of SVC calls, whether implemented or not, + but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range. + + Note that the symbols BLE_<module>_SVC_LAST is the end of the allocated SVC range, + rather than the last SVC function call actually defined and implemented. + + Specific SVC and event values are defined in each module's ble_<module>.h file, + which defines names of each individual SVC code based on the range start value. +*/ + +#ifndef BLE_RANGES_H__ +#define BLE_RANGES_H__ + +#define BLE_SVC_BASE 0x60 +#define BLE_SVC_LAST 0x6B /* Total: 12. */ + +#define BLE_RESERVED_SVC_BASE 0x6C +#define BLE_RESERVED_SVC_LAST 0x6F /* Total: 4. */ + +#define BLE_GAP_SVC_BASE 0x70 +#define BLE_GAP_SVC_LAST 0x8F /* Total: 32. */ + +#define BLE_GATTC_SVC_BASE 0x90 +#define BLE_GATTC_SVC_LAST 0x9F /* Total: 16. */ + +#define BLE_GATTS_SVC_BASE 0xA0 +#define BLE_GATTS_SVC_LAST 0xAF /* Total: 16. */ + +#define BLE_L2CAP_SVC_BASE 0xB0 +#define BLE_L2CAP_SVC_LAST 0xBF /* Total: 16. */ + + +#define BLE_EVT_INVALID 0x00 + +#define BLE_EVT_BASE 0x01 +#define BLE_EVT_LAST 0x0F /* Total: 15. */ + +#define BLE_GAP_EVT_BASE 0x10 +#define BLE_GAP_EVT_LAST 0x2F /* Total: 32. */ + +#define BLE_GATTC_EVT_BASE 0x30 +#define BLE_GATTC_EVT_LAST 0x4F /* Total: 32. */ + +#define BLE_GATTS_EVT_BASE 0x50 +#define BLE_GATTS_EVT_LAST 0x6F /* Total: 32. */ + +#define BLE_L2CAP_EVT_BASE 0x70 +#define BLE_L2CAP_EVT_LAST 0x8F /* Total: 32. */ + +#define BLE_OPT_INVALID 0x00 /**< Invalid BLE Option. */ + +#define BLE_OPT_BASE 0x01 /**< Common BLE Option base. */ +#define BLE_OPT_LAST 0x1F /**< Total: 31. */ + +#define BLE_GAP_OPT_BASE 0x20 /**< GAP BLE Option base. */ +#define BLE_GAP_OPT_LAST 0x3F /**< Total: 32. */ + +#define BLE_GATTC_OPT_BASE 0x40 /**< GATTC BLE Option base. */ +#define BLE_GATTC_OPT_LAST 0x5F /**< Total: 32. */ + +#define BLE_GATTS_OPT_BASE 0x60 /**< GATTS BLE Option base. */ +#define BLE_GATTS_OPT_LAST 0x7F /**< Total: 32. */ + +#define BLE_L2CAP_OPT_BASE 0x80 /**< L2CAP BLE Option base. */ +#define BLE_L2CAP_OPT_LAST 0x9F /**< Total: 32. */ + +#endif /* BLE_RANGES_H__ */ + +/** + @} + @} +*/