AndroidのBLEラジコンプロポアプリ「BLEPropo」と接続し、RCサーボとDCモータを制御するプログラムです。 BLE Nanoで動作を確認しています。 BLEPropo → https://github.com/lipoyang/BLEPropo

Dependencies:   BLE_API mbed

BLEを使ったAndroid用ラジコンプロポアプリ「BLEPropo」に対応するBLE Nano用ファームウェアです。
BLEPropoは、GitHubにて公開中。
https://github.com/lipoyang/BLEPropo
/media/uploads/lipoyang/blepropo_ui.png
ラジコンは、mbed HRM1017とRCサーボやDCモータを組み合わせて作ります。
/media/uploads/lipoyang/ministeer3.jpg
回路図
/media/uploads/lipoyang/ministeer3.pdf

Committer:
lipoyang
Date:
Sat Mar 14 12:02:48 2015 +0000
Revision:
5:7f89fca19a9e
-convert nRF51822 library to a folder

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lipoyang 5:7f89fca19a9e 1 /**************************************************************************/
lipoyang 5:7f89fca19a9e 2 /*!
lipoyang 5:7f89fca19a9e 3 @file ansi_esc_code.h
lipoyang 5:7f89fca19a9e 4 @author hathach (tinyusb.org)
lipoyang 5:7f89fca19a9e 5
lipoyang 5:7f89fca19a9e 6 @section LICENSE
lipoyang 5:7f89fca19a9e 7
lipoyang 5:7f89fca19a9e 8 Software License Agreement (BSD License)
lipoyang 5:7f89fca19a9e 9
lipoyang 5:7f89fca19a9e 10 Copyright (c) 2013, hathach (tinyusb.org)
lipoyang 5:7f89fca19a9e 11 All rights reserved.
lipoyang 5:7f89fca19a9e 12
lipoyang 5:7f89fca19a9e 13 Redistribution and use in source and binary forms, with or without
lipoyang 5:7f89fca19a9e 14 modification, are permitted provided that the following conditions are met:
lipoyang 5:7f89fca19a9e 15 1. Redistributions of source code must retain the above copyright
lipoyang 5:7f89fca19a9e 16 notice, this list of conditions and the following disclaimer.
lipoyang 5:7f89fca19a9e 17 2. Redistributions in binary form must reproduce the above copyright
lipoyang 5:7f89fca19a9e 18 notice, this list of conditions and the following disclaimer in the
lipoyang 5:7f89fca19a9e 19 documentation and/or other materials provided with the distribution.
lipoyang 5:7f89fca19a9e 20 3. Neither the name of the copyright holders nor the
lipoyang 5:7f89fca19a9e 21 names of its contributors may be used to endorse or promote products
lipoyang 5:7f89fca19a9e 22 derived from this software without specific prior written permission.
lipoyang 5:7f89fca19a9e 23
lipoyang 5:7f89fca19a9e 24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
lipoyang 5:7f89fca19a9e 25 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
lipoyang 5:7f89fca19a9e 26 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
lipoyang 5:7f89fca19a9e 27 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
lipoyang 5:7f89fca19a9e 28 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
lipoyang 5:7f89fca19a9e 29 INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
lipoyang 5:7f89fca19a9e 30 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
lipoyang 5:7f89fca19a9e 31 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
lipoyang 5:7f89fca19a9e 32 INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
lipoyang 5:7f89fca19a9e 33 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
lipoyang 5:7f89fca19a9e 34
lipoyang 5:7f89fca19a9e 35 This file is part of the tinyusb stack.
lipoyang 5:7f89fca19a9e 36 */
lipoyang 5:7f89fca19a9e 37 /**************************************************************************/
lipoyang 5:7f89fca19a9e 38
lipoyang 5:7f89fca19a9e 39 /** \file
lipoyang 5:7f89fca19a9e 40 * \brief TBD
lipoyang 5:7f89fca19a9e 41 *
lipoyang 5:7f89fca19a9e 42 * \note TBD
lipoyang 5:7f89fca19a9e 43 */
lipoyang 5:7f89fca19a9e 44
lipoyang 5:7f89fca19a9e 45 /** \ingroup TBD
lipoyang 5:7f89fca19a9e 46 * \defgroup TBD
lipoyang 5:7f89fca19a9e 47 * \brief TBD
lipoyang 5:7f89fca19a9e 48 *
lipoyang 5:7f89fca19a9e 49 * @{
lipoyang 5:7f89fca19a9e 50 */
lipoyang 5:7f89fca19a9e 51
lipoyang 5:7f89fca19a9e 52 #ifndef _ANSI_ESC_CODE_H_
lipoyang 5:7f89fca19a9e 53 #define _ANSI_ESC_CODE_H_
lipoyang 5:7f89fca19a9e 54
lipoyang 5:7f89fca19a9e 55
lipoyang 5:7f89fca19a9e 56 #ifdef __cplusplus
lipoyang 5:7f89fca19a9e 57 extern "C" {
lipoyang 5:7f89fca19a9e 58 #endif
lipoyang 5:7f89fca19a9e 59
lipoyang 5:7f89fca19a9e 60 #define CSI_CODE(seq) "\33[" seq
lipoyang 5:7f89fca19a9e 61 #define CSI_SGR(x) CSI_CODE(#x) "m"
lipoyang 5:7f89fca19a9e 62
lipoyang 5:7f89fca19a9e 63 //------------- Cursor movement -------------//
lipoyang 5:7f89fca19a9e 64 #define ANSI_CURSOR_UP(n) CSI_CODE(#n "A")
lipoyang 5:7f89fca19a9e 65 #define ANSI_CURSOR_DOWN(n) CSI_CODE(#n "B")
lipoyang 5:7f89fca19a9e 66 #define ANSI_CURSOR_FORWARD(n) CSI_CODE(#n "C")
lipoyang 5:7f89fca19a9e 67 #define ANSI_CURSOR_BACKWARD(n) CSI_CODE(#n "D")
lipoyang 5:7f89fca19a9e 68 #define ANSI_CURSOR_LINE_DOWN(n) CSI_CODE(#n "E")
lipoyang 5:7f89fca19a9e 69 #define ANSI_CURSOR_LINE_UP(n) CSI_CODE(#n "F")
lipoyang 5:7f89fca19a9e 70 #define ANSI_CURSOR_POSITION(n, m) CSI_CODE(#n ";" #m "H")
lipoyang 5:7f89fca19a9e 71
lipoyang 5:7f89fca19a9e 72 #define ANSI_ERASE_SCREEN(n) CSI_CODE(#n "J")
lipoyang 5:7f89fca19a9e 73 #define ANSI_ERASE_LINE(n) CSI_CODE(#n "K")
lipoyang 5:7f89fca19a9e 74
lipoyang 5:7f89fca19a9e 75 /** text color */
lipoyang 5:7f89fca19a9e 76 #define ANSI_TEXT_BLACK CSI_SGR(30)
lipoyang 5:7f89fca19a9e 77 #define ANSI_TEXT_RED CSI_SGR(31)
lipoyang 5:7f89fca19a9e 78 #define ANSI_TEXT_GREEN CSI_SGR(32)
lipoyang 5:7f89fca19a9e 79 #define ANSI_TEXT_YELLOW CSI_SGR(33)
lipoyang 5:7f89fca19a9e 80 #define ANSI_TEXT_BLUE CSI_SGR(34)
lipoyang 5:7f89fca19a9e 81 #define ANSI_TEXT_MAGENTA CSI_SGR(35)
lipoyang 5:7f89fca19a9e 82 #define ANSI_TEXT_CYAN CSI_SGR(36)
lipoyang 5:7f89fca19a9e 83 #define ANSI_TEXT_WHITE CSI_SGR(37)
lipoyang 5:7f89fca19a9e 84 #define ANSI_TEXT_DEFAULT CSI_SGR(39)
lipoyang 5:7f89fca19a9e 85
lipoyang 5:7f89fca19a9e 86 /** background color */
lipoyang 5:7f89fca19a9e 87 #define ANSI_BG_BLACK CSI_SGR(40)
lipoyang 5:7f89fca19a9e 88 #define ANSI_BG_RED CSI_SGR(41)
lipoyang 5:7f89fca19a9e 89 #define ANSI_BG_GREEN CSI_SGR(42)
lipoyang 5:7f89fca19a9e 90 #define ANSI_BG_YELLOW CSI_SGR(43)
lipoyang 5:7f89fca19a9e 91 #define ANSI_BG_BLUE CSI_SGR(44)
lipoyang 5:7f89fca19a9e 92 #define ANSI_BG_MAGENTA CSI_SGR(45)
lipoyang 5:7f89fca19a9e 93 #define ANSI_BG_CYAN CSI_SGR(46)
lipoyang 5:7f89fca19a9e 94 #define ANSI_BG_WHITE CSI_SGR(47)
lipoyang 5:7f89fca19a9e 95 #define ANSI_BG_DEFAULT CSI_SGR(49)
lipoyang 5:7f89fca19a9e 96
lipoyang 5:7f89fca19a9e 97 #ifdef __cplusplus
lipoyang 5:7f89fca19a9e 98 }
lipoyang 5:7f89fca19a9e 99 #endif
lipoyang 5:7f89fca19a9e 100
lipoyang 5:7f89fca19a9e 101 #endif /* _TUSB_ANSI_ESC_CODE_H_ */
lipoyang 5:7f89fca19a9e 102
lipoyang 5:7f89fca19a9e 103 /** @} */