欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標(biāo)題: 基于stm32的避障智能小車(chē)源碼 [打印本頁(yè)]

作者: 火火的菜鳥(niǎo)    時(shí)間: 2018-11-8 18:12
標(biāo)題: 基于stm32的避障智能小車(chē)源碼
可惜之前忘記錄視頻了

單片機(jī)源程序如下:
  1. #include <stdio.h>
  2. #include "LED_Driver.h"
  3. #include "Hot_Senser.h"
  4. #include "SysTick_Driver.h"
  5. #include "Usart_Driver.h"
  6. #include "TIM2_Driver.h"
  7. #include "Key.h"
  8. #include "Pin_Run.h"
  9. #include "Pwm_Car.h"

  10. //延時(shí)函數(shù)
  11. //void delay_xx(uint16_t ms)
  12. //{
  13. //       
  14. //        uint32_t i, j;
  15. //        for(i = 0; i < 0XFFF;i++)
  16. //        {
  17. //                for(j = 0; j < ms;j++);
  18. //        }
  19. //}


  20. int main(void)
  21. {
  22.        
  23. //uint8_t ret;
  24.        
  25.         LED_Init();
  26.   Hot_Sensor_Init();
  27.         SysTick_Init(72);
  28.         NVIC_USART1_Init();
  29.         USARTx_Init( USART1, 9600);
  30.         USARTx_Init( USART3, 9600);
  31.         Key_Init();
  32.         Pin_Run_Init();
  33. //        NVIC_TIM2_Init();
  34.   TIM2_Init();
  35. PWM_Smart_Init();
  36.        
  37.        

  38.        
  39.         while(1)
  40.         {
  41.                
  42. //                printf("i give you money, give u 100 w\n");
  43. //                printf("Li cheng want to need to mei girl\n");
  44. //               
  45. //                Usartx_PutStr( USART1, "i give you a zuo shamo de luzhou \n");
  46.                
  47. //                LED_Ctl( LED_ON);


  48.                         Pin_Run_Ctr();
  49.                
  50.                
  51. //        LED_Ctl( LED_OFF);
  52. //        delay_ms(1000);
  53.                
  54. ////阻塞函數(shù),有數(shù)據(jù)來(lái)才會(huì)往下運(yùn)行,不然停止在這里               
  55. //                ret = USART_ReceiveData( USART1);
  56. //                if(ret == '1')
  57. //                {
  58. //                                USART_SendData( USART1, 'h');
  59. //                                delay_ms(10);               
  60. //                                USART_SendData( USART1, 'e');  
  61. //                                delay_ms(10);       
  62. //                                USART_SendData( USART1, 'l');
  63. //                                delay_ms(10);       
  64. //                                USART_SendData( USART1, 'l');
  65. //                                delay_ms(10);       
  66. //                                USART_SendData( USART1, 'o');
  67. //                       
  68. //                                printf("hello \n");
  69. //                }
  70. //               
  71. //                if(ret == '2')
  72. //                {
  73. //                                LED_Ctl( LED_ON);
  74. //                }
  75.                
  76.                
  77. //                //讀取相應(yīng)引腳,判斷外設(shè)是否工作
  78. //                if(GPIO_ReadInputDataBit(GPIOA , GPIO_Pin_8) == SET)
  79. //                {
  80. //                        printf("狼來(lái)了\n");
  81. //                }else{
  82. //                        printf("下課了\n");
  83. //                }
  84.                
  85.         }
  86.        
  87. }
復(fù)制代碼

所有資料51hei提供下載:
stm32最終.rar (358.62 KB, 下載次數(shù): 17)



作者: 火火的菜鳥(niǎo)    時(shí)間: 2018-11-9 23:40
有工程,可以直接燒代碼就可以讓小車(chē)動(dòng)了,藍(lán)牙控制




歡迎光臨 (http://m.raoushi.com/bbs/) Powered by Discuz! X3.1