学习STM32Core平台串口2连接维特智能串口Normal协议,然后通过串口1直接连接舵机控制板(TTL),接收进行通信;需要看产品文档的可以直接官网搜索文档。

16路舵机控制板官方产品网址

在查看这个例程前请阅读相关说明书,了解舵机控制板所使用的协议,以及控制板的基本功能、
点击查看16路舵机控制板

16路舵机控制板

1、’可同时支持16路舵机大的输出
2、支持TTL 串口通信
3、支持上位机软件控制动作以及动作组
4、串口初始化为9600

如下图所示为官方提供资料

实物图图下

硬件操作流程
第一种
stm32控制板-------------usart1-------------------->16路舵机控制板
第二种
上位机软件 --------------usb ---------------16路舵机控制班。

上位机软件如下图

我的接线图
下面我用自己的开发板接的如下如 ,(16路舵机控制板)
设计采用的芯片是STM32F103ZET6,采用的16路舵机控制板,自主进行电路设计,通过串口传输,完成对16路舵机控制板串口通信完成动作。

下面直接上示例代码,(可下载官方的代码参考移植,上面有官网地址)-

主函数

void UART1_Put_StringL(unsigned char *Str,unsigned char len)
{unsigned char i = 0;for (i=0;i<len;i++) UART1_Put_Char(*(Str + i));
}void UART_DM_ReportData(unsigned char data[])
{       UART1_Put_StringL(data,10);     //打印长度根据所打印的数组长度来改,动作组是5,速度状态是10。最好填10。
}//**********动作组及各种舵机的速度角度配置都在“BOOL.h”头文件里面******//
//**********直接把数组名称放在UART_DM_ReportData()函数里面就可以了,例如UART_DM_ReportData(DM0_Speed1_Position_90)********///*******************************************************************************
* 函 数 名         : main
* 函数功能         : 主函数
* 输    入         : 无
* 输    出         : 无
*******************************************************************************/int main()
{u8 i=0;SysTick_Init(72);NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);  //中断优先级分组 分2组LED_Init();USART1_Init(9600);//串口初始化为9600while(1){UART_DM_ReportData(DM0_Speed20_Position_90);     //设置通道0,速度=1,位置=90度 delay_ms(10000);                                 //延时2S    UART_DM_ReportData(DM0_Speed20_Position_0);      //设置通道0,速度=3,位置=0度delay_ms(10000);UART_DM_ReportData(DM_Action0);            //设置动作组0delay_ms(2000);
//      UART_DM_ReportData(DM_Action1);          //设置动作组1
//      UART_DM_ReportData(DM_Action2);          //设置动作组2
//      UART_DM_ReportData(DM_Action3);          //设置动作组3
//      UART_DM_ReportData(DM_Action4);          //设置动作组4
//      UART_DM_ReportData(DM_Action5);          //设置动作组5
//      UART_DM_ReportData(DM_Action6);          //设置动作组6
//      UART_DM_ReportData(DM_Action7);          //设置动作组7
//      UART_DM_ReportData(DM_Action8);          //设置动作组8
//      UART_DM_ReportData(DM_Action9);          //设置动作组9
//      UART_DM_ReportData(DM_Action10);         //设置动作组10
//      UART_DM_ReportData(DM_Action11);         //设置动作组11
//      UART_DM_ReportData(DM_Action12);         //设置动作组12
//      UART_DM_ReportData(DM_Action13);         //设置动作组13
//      UART_DM_ReportData(DM_Action14);         //设置动作组14
//      UART_DM_ReportData(DM_Action15);         //设置动作组15}}

串口文件参考

#include "usart.h"
#include "system.h"
#include "string.h"#include <stdio.h>
#include "system.h"  //#include "stm32f10x.h"
#include "stm32f10x_gpio.h"
#include "stm32f10x_usart.h"
#include "stm32f10x_rcc.h"
#include "misc.h"
#include "bool.h"static unsigned char TxBuffer[256];
static unsigned char TxCounter=0;
static unsigned char count=0;
extern void CopeSerial1Data(unsigned char ucData);int fputc(int ch,FILE *p)  //函数默认的,在使用printf函数时自动调用
{USART_SendData(USART1,(u8)ch); while(USART_GetFlagStatus(USART1,USART_FLAG_TXE)==RESET);return ch;
}//串口1中断服务程序
//注意,读取USARTx->SR能避免莫名其妙的错误
u8 USART1_RX_BUF[USART1_REC_LEN];     //接收缓冲,最大USART_REC_LEN个字节.
//接收状态
//bit15, 接收完成标志
//bit14, 接收到0x0d
//bit13~0,   接收到的有效字节数目
u16 USART1_RX_STA=0;       //接收状态标记/*******************************************************************************
* 函 数 名         : USART1_Init
* 函数功能         : USART1初始化函数
* 输    入         : bound:波特率
* 输    出         : 无
*******************************************************************************/
void USART1_Init(u32 bound)
{//GPIO端口设置GPIO_InitTypeDef GPIO_InitStructure;USART_InitTypeDef USART_InitStructure;NVIC_InitTypeDef NVIC_InitStructure;RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1,ENABLE);/*  配置GPIO的模式和IO口 */GPIO_InitStructure.GPIO_Pin=GPIO_Pin_9;//TX             //串口输出PA9GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;GPIO_InitStructure.GPIO_Mode=GPIO_Mode_AF_PP;      //复用推挽输出GPIO_Init(GPIOA,&GPIO_InitStructure);  /* 初始化串口输入IO */GPIO_InitStructure.GPIO_Pin=GPIO_Pin_10;//RX          //串口输入PA10GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IN_FLOATING;       //模拟输入GPIO_Init(GPIOA,&GPIO_InitStructure); /* 初始化GPIO *///USART1 初始化设置USART_InitStructure.USART_BaudRate = bound;//波特率设置USART_InitStructure.USART_WordLength = USART_WordLength_8b;//字长为8位数据格式USART_InitStructure.USART_StopBits = USART_StopBits_1;//一个停止位USART_InitStructure.USART_Parity = USART_Parity_No;//无奇偶校验位USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;//无硬件数据流控制USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; //收发模式USART_Init(USART1, &USART_InitStructure); //初始化串口1USART_Cmd(USART1, ENABLE);  //使能串口1 USART_ClearFlag(USART1, USART_FLAG_TC);USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);//开启相关中断//Usart1 NVIC 配置NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;//串口1中断通道NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority=3;//抢占优先级3NVIC_InitStructure.NVIC_IRQChannelSubPriority =3;      //子优先级3NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;         //IRQ通道使能NVIC_Init(&NVIC_InitStructure);    //根据指定的参数初始化VIC寄存器、
}/*******************************************************************************
* 函 数 名         : USART1_IRQHandler
* 函数功能         : USART1中断函数
* 输    入         : 无
* 输    出         : 无
*******************************************************************************/
//void USART1_IRQHandler(void)                  //串口1中断服务程序
//{//  u8 r;
//  if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)  //接收中断
//  {//      r =USART_ReceiveData(USART1);//(USART1->DR);    //读取接收到的数据
//      if((USART1_RX_STA&0x8000)==0)//接收未完成
//      {//          if(USART1_RX_STA&0x4000)//接收到了0x0d
//          {//              if(r!=0x0a)USART1_RX_STA=0;//接收错误,重新开始
//              else USART1_RX_STA|=0x8000;    //接收完成了
//          }
//          else //还没收到0X0D
//          {
//              if(r==0x0d)USART1_RX_STA|=0x4000;
//              else
//              {//                  USART1_RX_BUF[USART1_RX_STA&0X3FFF]=r;
//                  USART1_RX_STA++;
//                  if(USART1_RX_STA>(USART1_REC_LEN-1))USART1_RX_STA=0;//接收数据错误,重新开始接收
//              }
//          }
//      }
//  }
//}void UART1_Put_Char(unsigned char DataToSend)
{TxBuffer[count++] = DataToSend;  USART_ITConfig(USART1, USART_IT_TXE, ENABLE);
}void UART1_Put_String(unsigned char *Str)
{while(*Str){if(*Str=='\r')UART1_Put_Char(0x0d);else if(*Str=='\n')UART1_Put_Char(0x0a);else UART1_Put_Char(*Str);Str++;}
}void CopeSerial1Data(unsigned char ucData)
{}void USART1_IRQHandler(void)
{if(USART_GetITStatus(USART1, USART_IT_TXE) != RESET){   USART_SendData(USART1, TxBuffer[TxCounter++]); if(TxCounter == count) {USART_ITConfig(USART1, USART_IT_TXE, DISABLE);// 全部发送完成}USART_ClearITPendingBit(USART1, USART_IT_TXE); }else if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET){CopeSerial1Data((unsigned char)USART1->DR);//处理数据USART_ClearITPendingBit(USART1, USART_IT_RXNE);}USART_ClearITPendingBit(USART1,USART_IT_ORE);}

bool 官方参数直接下载拿过来用

#ifndef _bool_H
#define _bool_H//****************************************位置角度控制****************************************//
static  unsigned char DM0_Speed1_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x01, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=1,位置90度
static  unsigned char DM0_Speed2_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x02, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=2,位置90度
static  unsigned char DM0_Speed3_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x03, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=3,位置90度
static  unsigned char DM0_Speed4_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x04, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=4,位置90度
static  unsigned char DM0_Speed5_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x05, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=5,位置90度
static  unsigned char DM0_Speed6_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x06, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=6,位置90度
static  unsigned char DM0_Speed7_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x07, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=7,位置90度
static  unsigned char DM0_Speed8_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x08, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=8,位置90度
static  unsigned char DM0_Speed9_Position_90[15]    =    { 0xff, 0x01, 0x00, 0x09, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=9,位置90度
static  unsigned char DM0_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x0a, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=10,位置90度
static  unsigned char DM0_Speed11_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x0b, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=11,位置90度
static  unsigned char DM0_Speed12_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x0c, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=12,位置90度
static  unsigned char DM0_Speed13_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x0d, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=13,位置90度
static  unsigned char DM0_Speed14_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x0e, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=14,位置90度
static  unsigned char DM0_Speed15_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x0f, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=15,位置90度
static  unsigned char DM0_Speed16_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x10, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=16,位置90度
static  unsigned char DM0_Speed17_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x11, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=17,位置90度
static  unsigned char DM0_Speed18_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x12, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=18,位置90度
static  unsigned char DM0_Speed19_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x13, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=19,位置90度
static  unsigned char DM0_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x00, 0x14, 0x00, 0xff, 0x02, 0x00, 0xdc, 0x05 };  //通道0,速度=20,位置90度static  unsigned char DM0_Speed1_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x01, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=1,位置0度
static  unsigned char DM0_Speed2_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x02, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=2,位置0度
static  unsigned char DM0_Speed3_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x03, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=3,位置0度
static  unsigned char DM0_Speed4_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x04, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=4,位置0度
static  unsigned char DM0_Speed5_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x05, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=5,位置0度
static  unsigned char DM0_Speed6_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x06, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=6,位置0度
static  unsigned char DM0_Speed7_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x07, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=7,位置0度
static  unsigned char DM0_Speed8_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x08, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=8,位置0度
static  unsigned char DM0_Speed9_Position_0[15]     =    { 0xff, 0x01, 0x00, 0x09, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=9,位置0度
static  unsigned char DM0_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x0a, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=10,位置0度
static  unsigned char DM0_Speed11_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x0b, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=11,位置0度
static  unsigned char DM0_Speed12_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x0c, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=12,位置0度
static  unsigned char DM0_Speed13_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x0d, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=13,位置0度
static  unsigned char DM0_Speed14_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x0e, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=14,位置0度
static  unsigned char DM0_Speed15_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x0f, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=15,位置0度
static  unsigned char DM0_Speed16_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x10, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=16,位置0度
static  unsigned char DM0_Speed17_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x11, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=17,位置0度
static  unsigned char DM0_Speed18_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x12, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=18,位置0度
static  unsigned char DM0_Speed19_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x13, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=19,位置0度
static  unsigned char DM0_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x00, 0x14, 0x00, 0xff, 0x02, 0x00, 0xf4, 0x01 };  //通道0,速度=20,位置0度static  unsigned char DM1_Speed1_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x01, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=1,位置90度
static  unsigned char DM1_Speed2_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x02, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=2,位置90度
static  unsigned char DM1_Speed3_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x03, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=3,位置90度
static  unsigned char DM1_Speed4_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x04, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=4,位置90度
static  unsigned char DM1_Speed5_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x05, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=5,位置90度
static  unsigned char DM1_Speed6_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x06, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=6,位置90度
static  unsigned char DM1_Speed7_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x07, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=7,位置90度
static  unsigned char DM1_Speed8_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x08, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=8,位置90度
static  unsigned char DM1_Speed9_Position_90[15]    =    { 0xff, 0x01, 0x01, 0x09, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=9,位置90度
static  unsigned char DM1_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x0a, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=10,位置90度
static  unsigned char DM1_Speed11_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x0b, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=11,位置90度
static  unsigned char DM1_Speed12_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x0c, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=12,位置90度
static  unsigned char DM1_Speed13_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x0d, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=13,位置90度
static  unsigned char DM1_Speed14_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x0e, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=14,位置90度
static  unsigned char DM1_Speed15_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x0f, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=15,位置90度
static  unsigned char DM1_Speed16_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x10, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=16,位置90度
static  unsigned char DM1_Speed17_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x11, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=17,位置90度
static  unsigned char DM1_Speed18_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x12, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=18,位置90度
static  unsigned char DM1_Speed19_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x13, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=19,位置90度
static  unsigned char DM1_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x01, 0x14, 0x00, 0xff, 0x02, 0x01, 0xdc, 0x05 };  //通道1,速度=20,位置90度static  unsigned char DM1_Speed1_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x01, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=1,位置0度
static  unsigned char DM1_Speed2_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x02, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=2,位置0度
static  unsigned char DM1_Speed3_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x03, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=3,位置0度
static  unsigned char DM1_Speed4_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x04, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=4,位置0度
static  unsigned char DM1_Speed5_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x05, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=5,位置0度
static  unsigned char DM1_Speed6_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x06, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=6,位置0度
static  unsigned char DM1_Speed7_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x07, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=7,位置0度
static  unsigned char DM1_Speed8_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x08, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=8,位置0度
static  unsigned char DM1_Speed9_Position_0[15]     =    { 0xff, 0x01, 0x01, 0x09, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=9,位置0度
static  unsigned char DM1_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x0a, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=10,位置0度
static  unsigned char DM1_Speed11_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x0b, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=11,位置0度
static  unsigned char DM1_Speed12_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x0c, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=12,位置0度
static  unsigned char DM1_Speed13_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x0d, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=13,位置0度
static  unsigned char DM1_Speed14_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x0e, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=14,位置0度
static  unsigned char DM1_Speed15_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x0f, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=15,位置0度
static  unsigned char DM1_Speed16_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x10, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=16,位置0度
static  unsigned char DM1_Speed17_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x11, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=17,位置0度
static  unsigned char DM1_Speed18_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x12, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=18,位置0度
static  unsigned char DM1_Speed19_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x13, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=19,位置0度
static  unsigned char DM1_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x01, 0x14, 0x00, 0xff, 0x02, 0x01, 0xf4, 0x01 };  //通道1,速度=20,位置0度static  unsigned char DM2_Speed1_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x01, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=1,位置90度
static  unsigned char DM2_Speed2_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x02, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=2,位置90度
static  unsigned char DM2_Speed3_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x03, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=3,位置90度
static  unsigned char DM2_Speed4_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x04, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=4,位置90度
static  unsigned char DM2_Speed5_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x05, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=5,位置90度
static  unsigned char DM2_Speed6_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x06, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=6,位置90度
static  unsigned char DM2_Speed7_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x07, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=7,位置90度
static  unsigned char DM2_Speed8_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x08, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=8,位置90度
static  unsigned char DM2_Speed9_Position_90[15]    =    { 0xff, 0x01, 0x02, 0x09, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=9,位置90度
static  unsigned char DM2_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x0a, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=10,位置90度
static  unsigned char DM2_Speed11_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x0b, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=11,位置90度
static  unsigned char DM2_Speed12_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x0c, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=12,位置90度
static  unsigned char DM2_Speed13_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x0d, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=13,位置90度
static  unsigned char DM2_Speed14_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x0e, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=14,位置90度
static  unsigned char DM2_Speed15_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x0f, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=15,位置90度
static  unsigned char DM2_Speed16_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x10, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=16,位置90度
static  unsigned char DM2_Speed17_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x11, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=17,位置90度
static  unsigned char DM2_Speed18_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x12, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=18,位置90度
static  unsigned char DM2_Speed19_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x13, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=19,位置90度
static  unsigned char DM2_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x02, 0x14, 0x00, 0xff, 0x02, 0x02, 0xdc, 0x05 };  //通道2,速度=20,位置90度static  unsigned char DM2_Speed1_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x01, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=1,位置0度
static  unsigned char DM2_Speed2_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x02, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=2,位置0度
static  unsigned char DM2_Speed3_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x03, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=3,位置0度
static  unsigned char DM2_Speed4_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x04, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=4,位置0度
static  unsigned char DM2_Speed5_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x05, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=5,位置0度
static  unsigned char DM2_Speed6_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x06, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=6,位置0度
static  unsigned char DM2_Speed7_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x07, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=7,位置0度
static  unsigned char DM2_Speed8_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x08, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=8,位置0度
static  unsigned char DM2_Speed9_Position_0[15]     =    { 0xff, 0x01, 0x02, 0x09, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=9,位置0度
static  unsigned char DM2_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x0a, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=10,位置0度
static  unsigned char DM2_Speed11_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x0b, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=11,位置0度
static  unsigned char DM2_Speed12_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x0c, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=12,位置0度
static  unsigned char DM2_Speed13_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x0d, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=13,位置0度
static  unsigned char DM2_Speed14_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x0e, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=14,位置0度
static  unsigned char DM2_Speed15_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x0f, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=15,位置0度
static  unsigned char DM2_Speed16_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x10, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=16,位置0度
static  unsigned char DM2_Speed17_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x11, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=17,位置0度
static  unsigned char DM2_Speed18_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x12, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=18,位置0度
static  unsigned char DM2_Speed19_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x13, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=19,位置0度
static  unsigned char DM2_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x02, 0x14, 0x00, 0xff, 0x02, 0x02, 0xf4, 0x01 };  //通道2,速度=20,位置0度static  unsigned char DM3_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x03, 0x0a, 0x00, 0xff, 0x02, 0x03, 0xdc, 0x05 };  //通道3,速度=10,位置90度
static  unsigned char DM3_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x03, 0x14, 0x00, 0xff, 0x02, 0x03, 0xdc, 0x05 };  //通道3,速度=20,位置90度static  unsigned char DM3_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x03, 0x0a, 0x00, 0xff, 0x02, 0x03, 0xf4, 0x01 };  //通道3,速度=10,位置0度
static  unsigned char DM3_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x03, 0x14, 0x00, 0xff, 0x02, 0x03, 0xf4, 0x01 };  //通道3,速度=20,位置0度static  unsigned char DM4_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x04, 0x0a, 0x00, 0xff, 0x02, 0x04, 0xdc, 0x05 };  //通道4,速度=10,位置90度
static  unsigned char DM4_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x04, 0x14, 0x00, 0xff, 0x02, 0x04, 0xdc, 0x05 };  //通道4,速度=20,位置90度static  unsigned char DM4_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x04, 0x0a, 0x00, 0xff, 0x02, 0x04, 0xf4, 0x01 };  //通道4,速度=10,位置0度
static  unsigned char DM4_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x04, 0x14, 0x00, 0xff, 0x02, 0x04, 0xf4, 0x01 };  //通道4,速度=20,位置0度static  unsigned char DM5_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x05, 0x0a, 0x00, 0xff, 0x02, 0x05, 0xdc, 0x05 };  //通道5,速度=10,位置90度
static  unsigned char DM5_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x05, 0x14, 0x00, 0xff, 0x02, 0x05, 0xdc, 0x05 };  //通道5,速度=20,位置90度static  unsigned char DM5_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x05, 0x0a, 0x00, 0xff, 0x02, 0x05, 0xf4, 0x01 };  //通道5,速度=10,位置0度
static  unsigned char DM5_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x05, 0x14, 0x00, 0xff, 0x02, 0x05, 0xf4, 0x01 };  //通道5,速度=20,位置0度static  unsigned char DM6_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x06, 0x0a, 0x00, 0xff, 0x02, 0x06, 0xdc, 0x05 };  //通道6,速度=10,位置90度
static  unsigned char DM6_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x06, 0x14, 0x00, 0xff, 0x02, 0x06, 0xdc, 0x05 };  //通道6,速度=20,位置90度static  unsigned char DM6_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x06, 0x0a, 0x00, 0xff, 0x02, 0x06, 0xf4, 0x01 };  //通道6,速度=10,位置0度
static  unsigned char DM6_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x06, 0x14, 0x00, 0xff, 0x02, 0x06, 0xf4, 0x01 };  //通道6,速度=20,位置0度static  unsigned char DM7_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x07, 0x0a, 0x00, 0xff, 0x02, 0x07, 0xdc, 0x05 };  //通道7,速度=10,位置90度
static  unsigned char DM7_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x07, 0x14, 0x00, 0xff, 0x02, 0x07, 0xdc, 0x05 };  //通道7,速度=20,位置90度static  unsigned char DM7_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x07, 0x0a, 0x00, 0xff, 0x02, 0x07, 0xf4, 0x01 };  //通道7,速度=10,位置0度
static  unsigned char DM7_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x07, 0x14, 0x00, 0xff, 0x02, 0x07, 0xf4, 0x01 };  //通道7,速度=20,位置0度static  unsigned char DM8_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x08, 0x0a, 0x00, 0xff, 0x02, 0x08, 0xdc, 0x05 };  //通道8,速度=10,位置90度
static  unsigned char DM8_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x08, 0x14, 0x00, 0xff, 0x02, 0x08, 0xdc, 0x05 };  //通道8,速度=20,位置90度static  unsigned char DM8_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x08, 0x0a, 0x00, 0xff, 0x02, 0x08, 0xf4, 0x01 };  //通道8,速度=10,位置0度
static  unsigned char DM8_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x08, 0x14, 0x00, 0xff, 0x02, 0x08, 0xf4, 0x01 };  //通道8,速度=20,位置0度static  unsigned char DM9_Speed10_Position_90[15]   =    { 0xff, 0x01, 0x09, 0x0a, 0x00, 0xff, 0x02, 0x09, 0xdc, 0x05 };  //通道9,速度=10,位置90度
static  unsigned char DM9_Speed20_Position_90[15]   =    { 0xff, 0x01, 0x09, 0x14, 0x00, 0xff, 0x02, 0x09, 0xdc, 0x05 };  //通道9,速度=20,位置90度static  unsigned char DM9_Speed10_Position_0[15]    =    { 0xff, 0x01, 0x09, 0x0a, 0x00, 0xff, 0x02, 0x09, 0xf4, 0x01 };  //通道9,速度=10,位置0度
static  unsigned char DM9_Speed20_Position_0[15]    =    { 0xff, 0x01, 0x09, 0x14, 0x00, 0xff, 0x02, 0x09, 0xf4, 0x01 };  //通道9,速度=20,位置0度static  unsigned char DM10_Speed10_Position_90[15]  =    { 0xff, 0x01, 0x0a, 0x0a, 0x00, 0xff, 0x02, 0x0a, 0xdc, 0x05 };  //通道10,速度=10,位置90度
static  unsigned char DM10_Speed20_Position_90[15]  =    { 0xff, 0x01, 0x0a, 0x14, 0x00, 0xff, 0x02, 0x0a, 0xdc, 0x05 };  //通道10,速度=20,位置90度static  unsigned char DM10_Speed10_Position_0[15]   =    { 0xff, 0x01, 0x0a, 0x0a, 0x00, 0xff, 0x02, 0x0a, 0xf4, 0x01 };  //通道10,速度=10,位置0度
static  unsigned char DM10_Speed20_Position_0[15]   =    { 0xff, 0x01, 0x0a, 0x14, 0x00, 0xff, 0x02, 0x0a, 0xf4, 0x01 };  //通道10,速度=20,位置0度static  unsigned char DM11_Speed10_Position_90[15]  =    { 0xff, 0x01, 0x0b, 0x0a, 0x00, 0xff, 0x02, 0x0b, 0xdc, 0x05 };  //通道11,速度=10,位置90度
static  unsigned char DM11_Speed20_Position_90[15]  =    { 0xff, 0x01, 0x0b, 0x14, 0x00, 0xff, 0x02, 0x0b, 0xdc, 0x05 };  //通道11,速度=20,位置90度static  unsigned char DM11_Speed10_Position_0[15]   =    { 0xff, 0x01, 0x0b, 0x0a, 0x00, 0xff, 0x02, 0x0b, 0xf4, 0x01 };  //通道11,速度=10,位置0度
static  unsigned char DM11_Speed20_Position_0[15]   =    { 0xff, 0x01, 0x0b, 0x14, 0x00, 0xff, 0x02, 0x0b, 0xf4, 0x01 };  //通道11,速度=20,位置0度static  unsigned char DM12_Speed10_Position_90[15]  =    { 0xff, 0x01, 0x0c, 0x0a, 0x00, 0xff, 0x02, 0x0c, 0xdc, 0x05 };  //通道12,速度=10,位置90度
static  unsigned char DM12_Speed20_Position_90[15]  =    { 0xff, 0x01, 0x0c, 0x14, 0x00, 0xff, 0x02, 0x0c, 0xdc, 0x05 };  //通道12,速度=20,位置90度static  unsigned char DM12_Speed10_Position_0[15]   =    { 0xff, 0x01, 0x0c, 0x0a, 0x00, 0xff, 0x02, 0x0c, 0xf4, 0x01 };  //通道12,速度=10,位置0度
static  unsigned char DM12_Speed20_Position_0[15]   =    { 0xff, 0x01, 0x0c, 0x14, 0x00, 0xff, 0x02, 0x0c, 0xf4, 0x01 };  //通道12,速度=20,位置0度static  unsigned char DM13_Speed10_Position_90[15]  =    { 0xff, 0x01, 0x0d, 0x0a, 0x00, 0xff, 0x02, 0x0d, 0xdc, 0x05 };  //通道13,速度=10,位置90度
static  unsigned char DM13_Speed20_Position_90[15]  =    { 0xff, 0x01, 0x0d, 0x14, 0x00, 0xff, 0x02, 0x0d, 0xdc, 0x05 };  //通道13,速度=20,位置90度static  unsigned char DM13_Speed10_Position_0[15]   =    { 0xff, 0x01, 0x0d, 0x0a, 0x00, 0xff, 0x02, 0x0d, 0xf4, 0x01 };  //通道13,速度=10,位置0度
static  unsigned char DM13_Speed20_Position_0[15]   =    { 0xff, 0x01, 0x0d, 0x14, 0x00, 0xff, 0x02, 0x0d, 0xf4, 0x01 };  //通道13,速度=20,位置0度static  unsigned char DM14_Speed10_Position_90[15]  =    { 0xff, 0x01, 0x0e, 0x0a, 0x00, 0xff, 0x02, 0x0e, 0xdc, 0x05 };  //通道14,速度=10,位置90度
static  unsigned char DM14_Speed20_Position_90[15]  =    { 0xff, 0x01, 0x0e, 0x14, 0x00, 0xff, 0x02, 0x0e, 0xdc, 0x05 };  //通道14,速度=20,位置90度static  unsigned char DM14_Speed10_Position_0[15]   =    { 0xff, 0x01, 0x0e, 0x0a, 0x00, 0xff, 0x02, 0x0e, 0xf4, 0x01 };  //通道14,速度=10,位置0度
static  unsigned char DM14_Speed20_Position_0[15]   =    { 0xff, 0x01, 0x0e, 0x14, 0x00, 0xff, 0x02, 0x0e, 0xf4, 0x01 };  //通道14,速度=20,位置0度static  unsigned char DM15_Speed10_Position_90[15]  =    { 0xff, 0x01, 0x0f, 0x0a, 0x00, 0xff, 0x02, 0x0f, 0xdc, 0x05 };  //通道15,速度=10,位置90度
static  unsigned char DM15_Speed20_Position_90[15]  =    { 0xff, 0x01, 0x0f, 0x14, 0x00, 0xff, 0x02, 0x0f, 0xdc, 0x05 };  //通道15,速度=20,位置90度static  unsigned char DM15_Speed10_Position_0[15]   =    { 0xff, 0x01, 0x0f, 0x0a, 0x00, 0xff, 0x02, 0x0f, 0xf4, 0x01 };  //通道15,速度=10,位置0度
static  unsigned char DM15_Speed20_Position_0[15]   =    { 0xff, 0x01, 0x0f, 0x14, 0x00, 0xff, 0x02, 0x0f, 0xf4, 0x01 };  //通道15,速度=20,位置0度//********************动作组********************//
static  unsigned char DM_Action0[5]   = { 0xff, 0x09, 0x00, 0x00, 0x00 };               //动作组0
static  unsigned char DM_Action1[5]   = { 0xff, 0x09, 0x00, 0x01, 0x00 };               //动作组1
static  unsigned char DM_Action2[5]   = { 0xff, 0x09, 0x00, 0x02, 0x00 };               //动作组2
static  unsigned char DM_Action3[5]   = { 0xff, 0x09, 0x00, 0x03, 0x00 };               //动作组3
static  unsigned char DM_Action4[5]   = { 0xff, 0x09, 0x00, 0x04, 0x00 };               //动作组4
static  unsigned char DM_Action5[5]   = { 0xff, 0x09, 0x00, 0x05, 0x00 };               //动作组5
static  unsigned char DM_Action6[5]   = { 0xff, 0x09, 0x00, 0x06, 0x00 };               //动作组6
static  unsigned char DM_Action7[5]   = { 0xff, 0x09, 0x00, 0x07, 0x00 };               //动作组7
static  unsigned char DM_Action8[5]   = { 0xff, 0x09, 0x00, 0x08, 0x00 };               //动作组8
static  unsigned char DM_Action9[5]   = { 0xff, 0x09, 0x00, 0x09, 0x00 };               //动作组9
static  unsigned char DM_Action10[5]  = { 0xff, 0x09, 0x00, 0x0a, 0x00 };               //动作组a
static  unsigned char DM_Action11[5]  = { 0xff, 0x09, 0x00, 0x0b, 0x00 };               //动作组b
static  unsigned char DM_Action12[5]  = { 0xff, 0x09, 0x00, 0x0c, 0x00 };               //动作组c
static  unsigned char DM_Action13[5]  = { 0xff, 0x09, 0x00, 0x0d, 0x00 };               //动作组d
static  unsigned char DM_Action14[5]  = { 0xff, 0x09, 0x00, 0x0e, 0x00 };               //动作组e
static  unsigned char DM_Action15[5]  = { 0xff, 0x09, 0x00, 0x0f, 0x00 };               //动作组f#endif

总结:

单片机连接舵机控制板进行舵机角度控制,电池电压7.2V 舵机mg996/mg90s
舵机控制板波特率9600
一般的stm32 机 本身就有1到4个PWM 控制输出根据个人情况去定义程序和选择产品
串口通信的常规用法。后期会使用不同的产品更新

上一期学习 STM32之九轴姿态传感器(BWT901CL)串口通信读取数据

学习 stm32(TTL)串口通信控制16路舵机控制板(维特智能)相关推荐

  1. 用arduino和16路舵机控制板制作一个蛇形仿生机器人

    要制作一个蛇形仿生机器人,需要使用Arduino和16路舵机控制板.首先需要设计机器人的结构并确定舵机的位置,然后使用Arduino编写程序来控制舵机的运动.在编写程序时,需要考虑机器人的运动学和力学 ...

  2. STM32控制16路舵机控制板PCA9685

    介绍 PCA9685 是最新的快速模式 Plus(Fm+)系列中的一员. Fm+器件可以提供更高的频率 (高达 1MHz)和更频繁(densely populated) 的总线操作(高达 4000pF ...

  3. 关于16路舵机控制器、24路舵机控制器与总线舵机控制器

    在开发机器人的过程中,可以采用舵机控制器去直接驱动舵机,开发者不需要在底层舵机驱动上消耗更多时间,这样可以用更多的精力去实现机器人的智能化功能. 幻尔出品了多款舵机控制器,供机器人开发者们选择.相信不 ...

  4. Arduino uno使用PCA9685模块实现16路舵机控制

    PCA9685模块 PCA9685是16路12位PWM信号发生器,可用于控制舵机.led.电机等设备,采用I2C通信.主机只需要I2C接口即可实现16路舵机控制. PCA9685的I2C地址默认0x4 ...

  5. 机械臂控制C语言程序,51单片机的6自由度机械臂 16路舵机控制 源码

    /*************************************************************************************************** ...

  6. 树莓派python控制舵机_使用树莓派控制16路舵机驱动板(pca9685)

    使用树莓派控制16路舵机驱动板(pca9685) 在树莓派上,可以通过RPI.GPIO方便地输出PWM进行舵机控制. 使用RPI.GPIO 创建一个 PWM 实例: 1 p =GPIO.PWM(cha ...

  7. 51单片机PCA9685控制16路舵机(代码可直接使用)

    51单片机PCA9685控制16路舵机 /**************************************************************************PCA96 ...

  8. 立创梁山派GD32F450ZGT6--通过PCA9685控制16路舵机

    PCA9685芯片,每一路LED输出端均可自由调节PWM波的频率 (40~1000Hz) 和占空比 (0%~100%) .这款芯片主要通过输出不同占空比的PWM脉冲信号来控制舵机转动的角度.是16通道 ...

  9. 树莓派c语言pca9685,使用树莓派控制16路舵机驱动板(pca9685)

    使用RPI.GPIO 创建一个 PWM 实例: 启用 PWM: 更改频率: 更改占空比: 停止 PWM: 但当你同时使用多个舵机时,PWM输出就变得困难了.这时可以借助舵机控制板来进行多路PWM控制. ...

最新文章

  1. 最全 Neo4j 可视化图形数据库的工具!
  2. HashMap的实现原理-----哈希讲解
  3. Flutter开发之布局-4-container(18)
  4. Spring AOP里面的几个名词
  5. 服务器供电系统图,【科·堂】图解5G和数据中心电源制式
  6. asl不成功怎么算_那些减肥成功还不反弹的人是怎么做到的?
  7. spring-boot-starter-swagger 1.3.0.RELEASE:新增对JSR-303的支持和host的配置
  8. 我的swagger上面怎么没有models_浅析特斯拉Model S的采样板
  9. Zookeeper和etcd比较
  10. 深信服桌面云的各种密码
  11. vant修改用户头像
  12. 一个系统同时装office2007和2019时遇到的问题及解决方案
  13. 数据倾斜的原因及解决方案
  14. 频域处理:傅里叶变换及小波变换
  15. 《从零开始的 RPG 游戏制作教程》第五期:制作物品和技能
  16. 用蓝牙构建一个sniffer来监听通话
  17. Windows10设置挂起(休眠)
  18. Scrapy设置headers、cookies三种方法
  19. c语言 感叹号啥作用,C语言中的双感叹号的作用
  20. 亚信科技亮相南京软博会,数智赋能百行千业

热门文章

  1. 新一代 OIer 的快速入门命令行教程
  2. [原创翻译]RFC1619 PPP over SONET/SDH
  3. 处nm是什么意思_“nm”是什么意思啊?
  4. 翻译文章“AST 模块:用 Python 修改 Python 代码”---!!注意ironpathyon未实现此功能...
  5. Debian折腾笔记
  6. 配置nginx.conf证书,实现http跳转htpps(80-->443)
  7. 关于结构体,枚举,联合的一些知识
  8. 华为应用市场AGC研习社|如何提升投放转化,实现获量增长?
  9. BOM对非标制造企业成本管控的重要性
  10. 买传奇域名空间要注意什么?