|
本來(lái)是想做滅火小車的,只是程序不夠嚴(yán)謹(jǐn),所以只傳了避障部分,后面有時(shí)間修改再傳個(gè)完整版。
制作出來(lái)的實(shí)物圖如下:
小車實(shí)物圖
單片機(jī)源程序如下:
- #include "stm32f10x.h" // Device header
- #include "car.h"
- #include "delay.h"
- #include "chaoshengbo.h"
- #include "PWM_Output.h"
- #include "timer.h"
- int main(void)
- {
- Sys_Delay_Init(72);
- TIM2_Init();
- Chaoshengbo_Init();
- TIM4_PWM_Init();
- Car_Stop(0);
- Delay_1ms(100);
- while(1)
- {
- ChaoShengBo_Run();
- }
- }
復(fù)制代碼
所有資料51hei提供下載:
Cars.zip
(389.15 KB, 下載次數(shù): 20)
2020-3-18 09:49 上傳
點(diǎn)擊文件名下載附件
三路避障小車
|
評(píng)分
-
查看全部評(píng)分
|