RCBControllerでモータを制御します。うおーるぼっとも動かせました。

Dependencies:   BLE_API_Native_IRC TB6612FNG2 mbed

Fork of BLE_RCBController by Junichi Katsu

  • 古いBLEライブラリを使っているのでプラットフォームは”Nordic nRF51822”を選択してください。
  • ライブラリ類はUpdateしないでください。コンパイルエラーになります。

うまく接続できない時は、iPhone/iPadのBluetoothをOFF->ONしてキャッシュをクリアしてみてください。

RCBControllerでうおーるぼっとを操縦する例 /media/uploads/robo8080/img_1671.jpg

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コネクタからとります。 /media/uploads/robo8080/img_1674.jpg

Committer:
jksoft
Date:
Thu Jul 10 14:21:52 2014 +0000
Revision:
0:8c643bfe55b7
??

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8c643bfe55b7 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8c643bfe55b7 2 *
jksoft 0:8c643bfe55b7 3 * The information contained herein is property of Nordic Semiconductor ASA.
jksoft 0:8c643bfe55b7 4 * Terms and conditions of usage are described in detail in NORDIC
jksoft 0:8c643bfe55b7 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 0:8c643bfe55b7 6 *
jksoft 0:8c643bfe55b7 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 0:8c643bfe55b7 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 0:8c643bfe55b7 9 * the file.
jksoft 0:8c643bfe55b7 10 *
jksoft 0:8c643bfe55b7 11 */
jksoft 0:8c643bfe55b7 12
jksoft 0:8c643bfe55b7 13 /** @file
jksoft 0:8c643bfe55b7 14 *
jksoft 0:8c643bfe55b7 15 * @defgroup ble_error_log_module Error Log Module
jksoft 0:8c643bfe55b7 16 * @{
jksoft 0:8c643bfe55b7 17 * @ingroup ble_sdk_lib
jksoft 0:8c643bfe55b7 18 * @brief Module for writing error and stack to flash memory.
jksoft 0:8c643bfe55b7 19 *
jksoft 0:8c643bfe55b7 20 * @details It contains functions for writing an error code, line number, filename/message and
jksoft 0:8c643bfe55b7 21 * the stack to the flash during an error, e.g. in the assert handler.
jksoft 0:8c643bfe55b7 22 *
jksoft 0:8c643bfe55b7 23 */
jksoft 0:8c643bfe55b7 24 #ifndef BLE_ERROR_LOG_H__
jksoft 0:8c643bfe55b7 25 #define BLE_ERROR_LOG_H__
jksoft 0:8c643bfe55b7 26
jksoft 0:8c643bfe55b7 27 #include <stdint.h>
jksoft 0:8c643bfe55b7 28 #include <stdbool.h>
jksoft 0:8c643bfe55b7 29 #include "ble_flash.h"
jksoft 0:8c643bfe55b7 30 #include "nordic_global.h"
jksoft 0:8c643bfe55b7 31
jksoft 0:8c643bfe55b7 32 #define ERROR_MESSAGE_LENGTH 128 /**< Length of error message to stored. */
jksoft 0:8c643bfe55b7 33 #define STACK_DUMP_LENGTH 256 /**< Length of stack to be stored at max: 64 entries of 4 bytes each. */
jksoft 0:8c643bfe55b7 34 #define FLASH_PAGE_ERROR_LOG (BLE_FLASH_PAGE_END - 2) /**< Address in flash where stack trace can be stored. */
jksoft 0:8c643bfe55b7 35
jksoft 0:8c643bfe55b7 36 /**@brief Error Log Data structure.
jksoft 0:8c643bfe55b7 37 *
jksoft 0:8c643bfe55b7 38 * @details The structure contains the error, message/filename, line number as well as the current
jksoft 0:8c643bfe55b7 39 * stack, at the time where an error occured.
jksoft 0:8c643bfe55b7 40 */
jksoft 0:8c643bfe55b7 41 typedef struct
jksoft 0:8c643bfe55b7 42 {
jksoft 0:8c643bfe55b7 43 uint16_t failure; /**< Indication that a major failure has occurred during last execution of the application. */
jksoft 0:8c643bfe55b7 44 uint16_t line_number; /**< Line number indicating at which line the failure occurred. */
jksoft 0:8c643bfe55b7 45 uint32_t err_code; /**< Error code when failure occurred. */
jksoft 0:8c643bfe55b7 46 uint8_t message[ERROR_MESSAGE_LENGTH]; /**< Will just use the first 128 bytes of filename to store for debugging purposes. */
jksoft 0:8c643bfe55b7 47 uint32_t stack_info[STACK_DUMP_LENGTH / 4]; /**< Will contain stack information, can be manually unwinded for debug purposes. */
jksoft 0:8c643bfe55b7 48 } ble_error_log_data_t;
jksoft 0:8c643bfe55b7 49
jksoft 0:8c643bfe55b7 50
jksoft 0:8c643bfe55b7 51 /**@brief Function for writing the file name/message, line number, and current program stack
jksoft 0:8c643bfe55b7 52 * to flash.
jksoft 0:8c643bfe55b7 53 *
jksoft 0:8c643bfe55b7 54 * @note This function will force the writing to flash, and disregard any radio communication.
jksoft 0:8c643bfe55b7 55 * USE THIS FUNCTION WITH CARE.
jksoft 0:8c643bfe55b7 56 *
jksoft 0:8c643bfe55b7 57 * @param[in] err_code Error code to be logged.
jksoft 0:8c643bfe55b7 58 * @param[in] p_message Message to be written to the flash together with stack dump, usually
jksoft 0:8c643bfe55b7 59 * the file name where the error occured.
jksoft 0:8c643bfe55b7 60 * @param[in] line_number Line number where the error occured.
jksoft 0:8c643bfe55b7 61 *
jksoft 0:8c643bfe55b7 62 * @return NRF_SUCCESS on successful writing of the error log.
jksoft 0:8c643bfe55b7 63 *
jksoft 0:8c643bfe55b7 64 */
jksoft 0:8c643bfe55b7 65 uint32_t ble_error_log_write(uint32_t err_code, const uint8_t * p_message, uint16_t line_number);
jksoft 0:8c643bfe55b7 66
jksoft 0:8c643bfe55b7 67
jksoft 0:8c643bfe55b7 68 #endif /* BLE_ERROR_LOG_H__ */
jksoft 0:8c643bfe55b7 69
jksoft 0:8c643bfe55b7 70 /** @} */