本帖最后由 zh123w 于 2013-5-22 09:15 编辑
开启RCSERIAL
其实就是是通过启用这段代码的:
#ifdef BTSERIAL
case 'K': //receive RC data from Bluetooth Serial adapter as a remote
rcData[THROTTLE] = (Serial.read() * 4) + 1000;
rcData[ROLL] = (Serial.read() * 4) + 1000;
rcData[PITCH] = (Serial.read() * 4) + 1000;
rcData[YAW] = (Serial.read() * 4) + 1000;
rcData[AUX1] = (Serial.read() * 4) + 1000;
break;
意思就是当接收到上位机传来的K后面接着传来5个8Bit的数字。即是0~255之间,但是遥控的值是1000~2000左右所以得×4+1000
这个就是mwc 蓝牙遥控的串口通信格式,
这是mwc bt remote apk,蓝牙上位机软件
net.loide.games.bicopter-1.apk
(82.75 KB, 下载次数: 659)
|