資源簡介
這份代碼使我們參加2018Robocon 飛龍繡球編寫的, 主要的作用就是操控手動車 包含 麥輪的驅動算法 4路編碼器配置 中斷配置 基于IIC的 OLED12864 以及 激光測距模塊的 驅動 手動車的遙控是PS2 手柄這份代碼凝聚了我們的心血 同時也是借鑒廣大網友的智慧來實現的。
代碼片段和文件信息
#include?“sys.h“
#include?“flying?dragon.h“
#include?“pwm.h“
extern?short?int?Dis_ForwordDis_Back;
/*
本次?麥輪使用了?6個定時器
T2~5??為4路編碼器
T12??T9?分別輸出兩路PWM
*/
int?Encoder_Date[4]Target_Speed[4]?={0}?PWM[4];
short?int?Speed_All?=?500;
int?main()
{
u8?i;
extern?u8?Data[];
Sys_Init();
OLED_Clear();
OLED_ShowString(01“TIM2:“12);
OLED_ShowString(02“TIM3:“12);
OLED_ShowString(03“TIM4:“12);
OLED_ShowString(04“TIM5:“12);
//
//Begin_Ray_test();
while(1)
{
// OLED_ShowNum(07Dis_Forword512);
// OLED_ShowNum(407Dis_Back512);
// //OLED_ShowNum(303i++512);
//
// OLED_ShowNum(301Encoder_Date[0]512);
// OLED_ShowNum(302Encoder_Date[1]512);
// OLED_ShowNum(303Encoder_Date[2]512);
// OLED_ShowNum(304Encoder_Date[3]512);
//
// OLED_ShowNum(701500-PWM[0]512);
// OLED_ShowNum(702500-PWM[1]512);
// OLED_ShowNum(703500-PWM[2]512);
// OLED_ShowNum(704500-PWM[3]512);
//
// OLED_S
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????109142??2016-04-15?21:57??麥輪手動車最終\CORE\core_cm4.h
?????文件??????22735??2016-04-15?21:57??麥輪手動車最終\CORE\core_cm4_simd.h
?????文件??????17146??2016-04-15?21:57??麥輪手動車最終\CORE\core_cmFunc.h
?????文件??????20513??2016-04-15?21:57??麥輪手動車最終\CORE\core_cmInstr.h
?????文件??????29605??2016-04-15?21:57??麥輪手動車最終\CORE\startup_stm32f40_41xxx.s
?????文件???????6924??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\misc.h
?????文件??????32880??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_adc.h
?????文件??????27318??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_can.h
?????文件???????2416??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_crc.h
?????文件??????14481??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_cryp.h
?????文件??????14946??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_dac.h
?????文件???????4296??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_dbgmcu.h
?????文件??????12977??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_dcmi.h
?????文件??????28882??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_dma.h
?????文件??????19692??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_dma2d.h
?????文件???????8012??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_exti.h
?????文件??????24467??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_flash.h
?????文件???????3275??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_flash_ramfunc.h
?????文件??????44924??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_fmc.h
?????文件??????27181??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_fsmc.h
?????文件??????23548??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_gpio.h
?????文件??????10084??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_hash.h
?????文件??????31939??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_i2c.h
?????文件???????4323??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_iwdg.h
?????文件??????21191??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_ltdc.h
?????文件???????7728??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_pwr.h
?????文件??????30063??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_rcc.h
?????文件???????3958??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_rng.h
?????文件??????40546??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_rtc.h
?????文件??????25470??2016-04-15?21:57??麥輪手動車最終\FWLIB\inc\stm32f4xx_sai.h
............此處省略129個文件信息
- 上一篇:易語言:無名模塊源碼
- 下一篇:易語言DirectUI窗口界面
評論
共有 條評論