题目内容

//RoamingWithWhiskers.c文件代码#include "stm32f10x_heads.h"#include "HelloRobot.h"//获取PA0的状态int PE2state(void){(1)}int PE3state(void)//获取PC13的状态{(2)}void Forward(void){(3)}void Left_Turn(void){(4)}void Right_Turn(void){int i;for(i=1;i<=26;i++){GPIO_SetBits(GPIOB, GPIO_Pin_8);delay_nus(1700);GPIO_ResetBits(GPIOB,GPIO_Pin_8);GPIO_SetBits(GPIOB, GPIO_Pin_9);delay_nus(1700);GPIO_ResetBits(GPIOB,GPIO_Pin_9);delay_nms(20);}}void Backward(void){int i;for(i=1;i<=65;i++){GPIO_SetBits(GPIOB, GPIO_Pin_8);delay_nus(1300);GPIO_ResetBits(GPIOB,GPIO_Pin_8);GPIO_SetBits(GPIOB, GPIO_Pin_9);delay_nus(1700);GPIO_ResetBits(GPIOB,GPIO_Pin_9);delay_nms(20);}}int main(void){BSP_Init();while(1){if( ( 5))//两胡须同时碰到{Backward(); //向后Left_Turn();//向左Left_Turn();//向左}//右胡须碰到 //向后 //向左( 6 )else if(PE3state()==1) //左胡须碰到{Backward();//向后Right_Turn();//向右}//否则向前(7)}}

查看答案
更多问题

/******************************************************************************** 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)}/******************************************************************************** Function Name : GPIO_Configuration* Description: Configures GPIO Modes*******************************************************************************/void GPIO_Configuration(){/* Configures IO*/GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8|GPIO_Pin_9;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOB, &GPIO_InitStructure);//开关按钮 A0 C13(2)(3)}

B Listen to the dialogue again, and then choose the best answer.[音频]1. The man and the woman are talking about_______.

A. their trip to Suzhou
B. their trip toTibet
C. their travel plan for next year

2. Why do they want to cancel the trip?

A. Because they don’t have enough time.
Because they don’t have enough money.
C. Both A and B.

3. According to David, how can they get enough money for the trip?

A. By asking their parents for money.
By working during the vacation.
C. By saving money.

答案查题题库