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

Dependencies:   BLE_API TB6612FNG2 mbed nRF51822

Fork of BLE_RCBController2 by Junichi Katsu

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

ライブラリ類をUpdateするとコンパイル出来なくなります。インポートした物をそのまま使って下さい。

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

Components / Wallbot
This robot has switch, line sensors and motors. It controls by mbed.

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

/media/uploads/robo8080/img_1711.jpg

/media/uploads/robo8080/img_1703.jpg

HRM1017の電源はうおーるぼっとのUSBコネクタからとります。 /media/uploads/robo8080/img_1674.jpg

Committer:
jksoft
Date:
Wed Aug 20 13:41:01 2014 +0000
Revision:
4:ebda47d22091
Parent:
nRF51822/nordic/nrf-sdk/ble/ble_services/ble_tps.h@1:48f6e08a3ac2
?????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 1:48f6e08a3ac2 1 /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 1:48f6e08a3ac2 2 *
jksoft 1:48f6e08a3ac2 3 * The information contained herein is property of Nordic Semiconductor ASA.
jksoft 1:48f6e08a3ac2 4 * Terms and conditions of usage are described in detail in NORDIC
jksoft 1:48f6e08a3ac2 5 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
jksoft 1:48f6e08a3ac2 6 *
jksoft 1:48f6e08a3ac2 7 * Licensees are granted free, non-transferable use of the information. NO
jksoft 1:48f6e08a3ac2 8 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
jksoft 1:48f6e08a3ac2 9 * the file.
jksoft 1:48f6e08a3ac2 10 *
jksoft 1:48f6e08a3ac2 11 */
jksoft 1:48f6e08a3ac2 12
jksoft 1:48f6e08a3ac2 13 /** @file
jksoft 1:48f6e08a3ac2 14 *
jksoft 1:48f6e08a3ac2 15 * @defgroup ble_sdk_srv_tps TX Power Service
jksoft 1:48f6e08a3ac2 16 * @{
jksoft 1:48f6e08a3ac2 17 * @ingroup ble_sdk_srv
jksoft 1:48f6e08a3ac2 18 * @brief TX Power Service module.
jksoft 1:48f6e08a3ac2 19 *
jksoft 1:48f6e08a3ac2 20 * @details This module implements the TX Power Service with the TX Power Level characteristic.
jksoft 1:48f6e08a3ac2 21 * During initialization it adds the TX Power Service and TX Power Level characteristic
jksoft 1:48f6e08a3ac2 22 * with the specified initial value to the BLE stack database.
jksoft 1:48f6e08a3ac2 23 *
jksoft 1:48f6e08a3ac2 24 * It provides a function for letting the application update the TX Power Level
jksoft 1:48f6e08a3ac2 25 * characteristic.
jksoft 1:48f6e08a3ac2 26 *
jksoft 1:48f6e08a3ac2 27 * @note Attention!
jksoft 1:48f6e08a3ac2 28 * To maintain compliance with Nordic Semiconductor ASA Bluetooth profile
jksoft 1:48f6e08a3ac2 29 * qualification listings, this section of source code must not be modified.
jksoft 1:48f6e08a3ac2 30 */
jksoft 1:48f6e08a3ac2 31
jksoft 1:48f6e08a3ac2 32 #ifndef BLE_TPS_H__
jksoft 1:48f6e08a3ac2 33 #define BLE_TPS_H__
jksoft 1:48f6e08a3ac2 34
jksoft 1:48f6e08a3ac2 35 #include <stdint.h>
jksoft 1:48f6e08a3ac2 36 #include "ble.h"
jksoft 1:48f6e08a3ac2 37 #include "ble_srv_common.h"
jksoft 1:48f6e08a3ac2 38
jksoft 1:48f6e08a3ac2 39 /**@brief TX Power Service init structure. This contains all options and data needed for
jksoft 1:48f6e08a3ac2 40 * initialization of the service. */
jksoft 1:48f6e08a3ac2 41 typedef struct
jksoft 1:48f6e08a3ac2 42 {
jksoft 1:48f6e08a3ac2 43 int8_t initial_tx_power_level; /**< Initial value of the TX Power Level characteristic (in dBm). */
jksoft 1:48f6e08a3ac2 44 ble_srv_security_mode_t tps_attr_md; /**< Initial Security Setting for TX Power Service Characteristics. */
jksoft 1:48f6e08a3ac2 45 } ble_tps_init_t;
jksoft 1:48f6e08a3ac2 46
jksoft 1:48f6e08a3ac2 47 /**@brief TX Power Service structure. This contains various status information for the service. */
jksoft 1:48f6e08a3ac2 48 typedef struct
jksoft 1:48f6e08a3ac2 49 {
jksoft 1:48f6e08a3ac2 50 uint16_t service_handle; /**< Handle of TX Power Service (as provided by the BLE stack). */
jksoft 1:48f6e08a3ac2 51 ble_gatts_char_handles_t tx_power_level_handles; /**< Handles related to the TX Power Level characteristic. */
jksoft 1:48f6e08a3ac2 52 } ble_tps_t;
jksoft 1:48f6e08a3ac2 53
jksoft 1:48f6e08a3ac2 54 /**@brief Function for initializing the TX Power Service.
jksoft 1:48f6e08a3ac2 55 *
jksoft 1:48f6e08a3ac2 56 * @param[out] p_tps TX Power Service structure. This structure will have to be supplied by
jksoft 1:48f6e08a3ac2 57 * the application. It will be initialized by this function, and will later
jksoft 1:48f6e08a3ac2 58 * be used to identify this particular service instance.
jksoft 1:48f6e08a3ac2 59 * @param[in] p_tps_init Information needed to initialize the service.
jksoft 1:48f6e08a3ac2 60 *
jksoft 1:48f6e08a3ac2 61 * @return NRF_SUCCESS on successful initialization of service, otherwise an error code.
jksoft 1:48f6e08a3ac2 62 */
jksoft 1:48f6e08a3ac2 63 uint32_t ble_tps_init(ble_tps_t * p_hrs, const ble_tps_init_t * p_tps_init);
jksoft 1:48f6e08a3ac2 64
jksoft 1:48f6e08a3ac2 65 /**@brief Function for setting the state of the Sensor Contact Detected bit.
jksoft 1:48f6e08a3ac2 66 *
jksoft 1:48f6e08a3ac2 67 * @param[in] p_tps TX Power Service structure.
jksoft 1:48f6e08a3ac2 68 * @param[in] tx_power_level New TX Power Level (unit dBm, range -100 to 20).
jksoft 1:48f6e08a3ac2 69 *
jksoft 1:48f6e08a3ac2 70 * @return NRF_SUCCESS on success, otherwise an error code.
jksoft 1:48f6e08a3ac2 71 */
jksoft 1:48f6e08a3ac2 72 uint32_t ble_tps_tx_power_level_set(ble_tps_t * p_tps, int8_t tx_power_level);
jksoft 1:48f6e08a3ac2 73
jksoft 1:48f6e08a3ac2 74 #endif // BLE_TPS_H__
jksoft 1:48f6e08a3ac2 75
jksoft 1:48f6e08a3ac2 76 /** @} */