====== Magic Logic BLE 指令说明 ====== {{:ble.png?600|}}\\ ===== 说明 ===== 模块上有一个状态指示灯,开机会慢闪,表示等待连接。如果有手机或其它主机连接到BLE控制器,状态灯就会从慢闪变成常亮。\\ 因此,在正常使用此模块期间,必须保证状态灯常亮(!:注意:状态灯在模块内部,在明亮环境下可能不够醒目)\\ 本控制器的坐标定义如下:\\ {{::k1005master_overviewx.png?200|}} {{::k1005master_overviewy.png?200|}} {{::k1005master_overviewz.png?200|}} ===== 基础指令 ===== ==== 设置端口[2\3\4]输出[高\低] ==== {{::sc3ob_ble01_cmd01.png|}}\\ ==== 设置端口[3\4]脉冲(255) ==== {{::sc3ob_ble01_cmd02.png|}}\\ ==== 设置端口[3\4]舵机(360) ==== {{::sc3ob_ble01_cmd03.png|}}\\ ==== 设置端口[3\4]音符[C4]持续(1)拍 ==== {{::sc3ob_ble01_cmd04.png|}}\\ ==== <读取端口[1]数字量> ==== {{::sc3ob_ble01_cmd05.png|}}\\ ==== (读取端口[1]模拟量) ==== {{::sc3ob_ble01_cmd06.png|}}\\ ==== (读取设备[加速度X\Y\Z]的数值) ==== {{::sc3ob_ble01_cmd07.png|}}\\ ==== <当设备为[倾斜\平放\前倾\后倾\左倾\右倾..]> ==== {{::sc3ob_ble01_cmd08.png|}}\\ ===== 高级指令 ===== ==== 设置引脚[0\1\2\3\6\7]输出[高\低] ==== {{::sc3ob_ble01_cmd09.png|}}\\ ==== 设置引脚[0\1\2\3]脉冲(255) ==== {{::sc3ob_ble01_cmd10.png|}}\\ ==== 设置引脚[0\1\2\3]舵机(360) ==== {{::sc3ob_ble01_cmd11.png|}}\\ ==== 设置[引脚PWM1\2\3\4]舵机(360)行驶(1)秒 ==== {{::sc3ob_ble01_cmd12.png|}}\\ ==== 设置引脚[0\1\2\3]以频率(4000)占空比(255)输出 ==== {{::sc3ob_ble01_cmd13.png|}}\\ ==== 全部停止输出 ==== {{::sc3ob_ble01_cmd14.png|}}\\ ==== (读取引脚[A0\A1]模拟量) ==== {{::sc3ob_ble01_cmd15.png|}}\\ ===== 小车指令 ===== ==== 设置引脚[0\1\2\3]引脚[0\1\2\3]接[电机A\B] ==== {{::sc3ob_ble01_cmd16.png|}}\\ ==== 向[前\后\左\右]行驶 ==== {{::sc3ob_ble01_cmd17.png|}}\\ ==== 向[前\后\左\右]行驶(0)秒 ==== {{::sc3ob_ble01_cmd18.png|}}\\ ==== 刹车 ==== {{::sc3ob_ble01_cmd19.png|}}\\ ==== 设置[电机A\B]方向[正转\反转\停止] ==== {{::sc3ob_ble01_cmd20.png|}}\\ ==== 设置[电机A\B]速度(100) ==== {{::sc3ob_ble01_cmd21.png|}}\\ [[scratchob|返回目录]]