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

標題: STM32A0智能小車 沒有程序 求幫助 [打印本頁]

作者: RWTION    時間: 2021-7-20 13:26
標題: STM32A0智能小車 沒有程序 求幫助
  1. 部分功能實現:
  2. ①小車前進后退左轉右轉
  3. #include "stm32f10x.h"
  4. #include "delay.h"
  5. #include "motor.h"
  6. /*
  7. void ZYSTM32_run(int speed,int time);       //前進函數
  8. void ZYSTM32_brake(int time);               //剎車函數
  9. void ZYSTM32_Left(int speed,int time);      //左轉函數
  10. void ZYSTM32_Spin_Left(int speed,int time); //左旋轉函數
  11. void ZYSTM32_Right(int speed,int time);     //右轉函數
  12. void ZYSTM32_Spin_Right(int speed,int time);//右旋轉函數
  13. void ZYSTM32_back(int speed,int time);      //后退函數

  14. */


  15. int main(void)
  16. {        
  17.          delay_init();
  18.          TIM4_PWM_Init(7199,0);  //初始化PWM
  19.                 while(1)
  20.                 {  
  21.                  ZYSTM32_back(50,1000);//后退1s
  22.                  ZYSTM32_brake(500);//停止0.5S
  23.      ZYSTM32_run(50,1000);//前進1S
  24.                  ZYSTM32_brake(500);//停止0.5S
  25.      ZYSTM32_Left(50,1000);//左轉1S
  26.      ZYSTM32_Right(50,1000);//右轉1S
  27.            ZYSTM32_Spin_Right(50,1000);//向右旋轉2S
  28.      ZYSTM32_Spin_Left(50,1000);//向左旋轉2S
  29.      ZYSTM32_brake(500);//停止0.5S                 
  30.                 }
  31. }

復制代碼

小車實物圖+板子原理圖

23fbe891fde140330240c8653114105.jpg (1.97 MB, 下載次數: 106)

23fbe891fde140330240c8653114105.jpg

原理圖.zip

226.23 KB, 下載次數: 3, 下載積分: 黑幣 -5






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