一圆盘在光滑的水平面上向右平行移动,若圆盘再受一力偶作用时,则圆盘质心C的运动状态是( )。
A. 沿水平方向作变速直线运动
B. 静止不动
C. 保持原来的运动状态
D. 沿水平方向作匀速直线运动
质系动量对于时间的变化率,只与作用于系统的外力有关,而与内力无关。
A. 对
B. 错
//用定时器T2 实现机器人红外距离检测/******************************************************************************** Function Name : RCC_Configuration* Description: Configures System Clocks*******************************************************************************/void RCC_Configuration(void){RCC_DeInit();RCC_HSEConfig(RCC_HSE_ON);HSEStartUpStatus = RCC_WaitForHSEStartUp();if(HSEStartUpStatus == SUCCESS){RCC_HCLKConfig(RCC_SYSCLK_Div1);RCC_PCLK2Config(RCC_HCLK_Div1);RCC_PCLK1Config(RCC_HCLK_Div2);FLASH_SetLatency(FLASH_Latency_2);FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);RCC_PLLCmd(ENABLE);while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET);RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);while(RCC_GetSYSCLKSource() != 0x08);}/* Enable GPIOA~E and AFIO clocks 设置红外发送接受的时钟*/(1)RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1, ENABLE);/* TIM2 clock enable */(2)}/******************************************************************************** Function Name : GPIO_Configuration* Description: Configures GPIO Modes*******************************************************************************/void GPIO_Configuration(){/* Configure USART1 Tx (PA.09) as alternate function push-pull */GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOA, &GPIO_InitStructure);/* Configure USART1 Rx (PA.10) as input floating */GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;GPIO_Init(GPIOA, &GPIO_InitStructure);/* Configure infrared IO*/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOE, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOE, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOE, &GPIO_InitStructure);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOE, &GPIO_InitStructure);}
#include "stm32f10x_heads.h"#include "HelloRobot.h"void Timx_Init(void);#define LeftIR GPIO_ReadInputDataBit(GPIOE,GPIO_Pin_2) //左边红外接收连接到PE2unsigned int time;//定时时间值int leftdistance;//左边的距离int distanceLeft, irDetectLeft;unsigned int frequency[5]={29370,31230,33050,35700,38460};void Timx_Init(void){(1)//复位TIM2定时器}void FreqOut(unsigned int Freq){//设置定时器T2(2)/* Clear TIM2 update pending flag[清除TIM2溢出中断标志] */(3)/* Enable TIM2 Update interrupt [TIM2溢出中断允许]*/(4)/* TIM2 enable counter [允许tim2计数]*/(5)delay_nus(800);//延时(6)//停止定时器}void Get_lr_Distances(){unsigned int count;leftdistance = 0;//初始化左边的距离for(count = 0;count<5;count++){(7)//发射频率irDetectLeft = (8);printf("irDetectLeft = %d\r\n",irDetectLeft);(9)}}int main(void){BSP_Init();Timx_Init();//定时器初始化函数USART_Configuration();printf("Program Running!\r\n");printf("FREQENCY DETECTED\r\n");while(1){(10)printf("distanceLeft = %d\r\n",(11));printf("-----------------\r\n");delay_nms(1000);}}