找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3581|回復(fù): 2
收起左側(cè)

STM32超聲波定位算法(融合測試)源碼

[復(fù)制鏈接]
ID:157311 發(fā)表于 2018-4-1 10:50 | 顯示全部樓層 |閱讀模式
超詳細(xì)的資料,是我自己編寫的,包含定位算法的程序及其分析,有需要的速速學(xué)習(xí)吧
0.png

stm32主程序源碼:
  1. #include <stm32f10x.h>
  2. #include "Nvic_Exit.h"
  3. #include "ov7670.h"
  4. #include "I2C.h"
  5. #include "ILI9325_32.h"
  6. #include "GUI_32.h"
  7. #include "delay.h"
  8. #include "led.h"
  9. #include "data_conf.h"
  10. #include "PictureAnalyse.h"
  11. #include "Tim1.h"

  12. /*
  13. 用到的模塊
  14. 1:IIC 對應(yīng)端口初始化
  15. 2:OV7670寄存器初始化+端口初始化
  16. 3:添加FIFO.C輔助端口初始化,并且添加RRST()和WRST()兩個(gè)初始化函數(shù)
  17. 4:外部中斷初始化
  18. 5:LED指示燈初始化
  19. 6:延時(shí)初始化
  20. 7: 串口初始化 測試用

  21. 程序邏輯

  22. */
  23. extern Picture_Control PictureContorl;
  24. int main()
  25. {
  26.           LED_GPIO_Config();//指示燈初始化
  27.           delay_init(72);//延時(shí)初始化   
  28.           ILI9325_initial();//TFT端口初始化
  29.           Anal_I2C_Init();//IIC初始化
  30.     ov7670_PortConfig();//攝像頭模塊引腳初始化//對RCK,WR,OE,WRST,RRST進(jìn)行了端口設(shè)置       
  31.           Cmos7670_init();//配置寄存
  32.           GUI_clearscreen(0xffff);//清屏
  33.     GUI_sprintf_string(50, 100,"TFT Init Successful !", 0x0000,0xffff);        //顯示初始化
  34.           GUI_clearscreen(0xffff);//清屏
  35.                 Exit_Init(GPIOC, GPIO_Pin_12, GPIO_Mode_IPU, EXTI_Trigger_Falling, 0, 0);        //VSYNC //外部中斷初始化
  36.   //        TakeVerfPhoto();
  37.           TIM1_Init();
  38.                 GUI_sprintf_string(10,50,"ERROR:",0x0000,0xffff);
  39.           GUI_sprintf_string(10,100,"ERROR_Verf:",0x0000,0xffff);
  40.                 GUI_sprintf_string(10,150,"+offset:",0x0000,0xffff);
  41.                 GUI_sprintf_string(10,200,"-offset:",0x0000,0xffff);
  42.           GUI_sprintf_string(10,250,"RunTime:",0x0000,0xffff);
  43.     while(1)
  44.                 {

  45.               GUI_wrul(200,50,PictureContorl.Control_Value,0x0000,0xffff); //刷新控制?
  46.                         GUI_wrul(200,100,PictureContorl.Control_Value_Verf,0x0000,0xffff); //刷新控制量
  47.                   if(PictureContorl.Control_Value-PictureContorl.Control_Value_Verf>0)
  48.                        
  49.                                 GUI_wrul(200,150,(PictureContorl.Control_Value-PictureContorl.Control_Value_Verf),0x0000,0xffff); //刷新控制量
  50.                         else
  51.         GUI_wrul(200,200,(PictureContorl.Control_Value_Verf-PictureContorl.Control_Value),0x0000,0xffff); //刷新控制量
  52.                                 GUI_wrul(200,250,PictureContorl.Control_Value,0x0000,0xffff); //刷新控制?
  53.                        
  54.                 }
  55. }

復(fù)制代碼
下載:
28 攝像頭定位算法(融合測試) 定位算法2.rar (4.68 MB, 下載次數(shù): 45)



評分

參與人數(shù) 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵(lì)!

查看全部評分

回復(fù)

使用道具 舉報(bào)

ID:137231 發(fā)表于 2018-4-1 21:47 | 顯示全部樓層
謝謝分享,定位范圍有多寬
回復(fù)

使用道具 舉報(bào)

ID:314855 發(fā)表于 2018-7-7 23:06 | 顯示全部樓層
請問是用什么軟件寫的
回復(fù)

使用道具 舉報(bào)

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表