智能灭火机器人第程序

智能灭火机器人第程序

ID:28330623

大小:167.54 KB

页数:24页

时间:2018-12-09

智能灭火机器人第程序_第1页
智能灭火机器人第程序_第2页
智能灭火机器人第程序_第3页
智能灭火机器人第程序_第4页
智能灭火机器人第程序_第5页
资源描述:

《智能灭火机器人第程序》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库

1、附录1main.c#include"wei.h"#defineP_IOA_Data(volatileunsignedint*)0x7000#defineP_IOA_Dir(volatileunsignedint*)0x7002#defineP_IOA_Attrib(volatileunsignedint*)0x7003#defineP_IOB_Data(volatileunsignedint*)0x7005#defineP_IOB_Dir(volatileunsignedint*)0x7007#de

2、fineP_IOB_Attrib(volatileunsignedint*)0x7008#defineP_TimerB_Data(volatileunsignedint*)0x700C#defineP_TimerB_Ctrl(volatileunsignedint*)0x700D#defineP_INT_Ctrl(volatileunsignedint*)0x7010#defineP_INT_Clear(volatileunsignedint*)0x7011#defineP_ADC(volatile

3、unsignedint*)0x7014#defineP_ADC_Ctrl(volatileunsignedint*)0x7015#defineP_ADC_MUX_Ctrl(volatileunsignedint*)0x702B#defineP_ADC_MUX_Data(volatileunsignedint*)0x702C#defineC_FIQ_PWM0x8000//P_INT_Ctrl#defineC_FIQ_TMA0x2000//P_INT_Ctrl#defineC_FIQ_TMB0x0800

4、//P_INT_Ctrl#defineC_IRQ4_1KHz0x0010//P_INT_Ctrl#defineC_IRQ4_2KHz0x0020//P_INT_Ctrl#defineC_IRQ4_4KHz0x0040//P_INT_Ctrl#defineC_IRQ5_2Hz0x0004//P_INT_Ctrl#defineC_IRQ5_4Hz0x0008//P_INT_Ctrl#defineC_TMB_32KHz0x0002//P_TimerB_Ctrl#defineC_TMB_PWM_OFF0x0

5、000//P_TimerB_Ctrl#defineP_Watchdog_Clear(volatileunsignedint*)0x7012unsignedintmm,min,cny,Delaynumber,xp=255,flag,dd;unsignedintleft,right;unsignedintpulse_x,pulse_y;unsignedintpaixu[7];//排序unsignedintchdata[7];//火焰传感器检测通道unsignedintworkstate=0;//进入检测

6、范围unsignedintsucessfire=0;//灭火成功标记voidPWM_left(unsignedinthigh_time,unsignedintcyclical_time);voidPWM_right(unsignedinthigh_time,unsignedintcyclical_time);voidforward(unsignedintm,unsignedintn);voidforward_s(unsignedintm,unsignedintn);voidforward_s2(un

7、signedintm,unsignedintn);voidbackward(unsignedintm,unsignedintn);voidturn_left(unsignedintm);voidturn_right(unsignedintm);voidstop(void);voidget_AD(void);//AD转换24voidsystem_init(void);//系统初始化voiddelay_ms(unsignedintt);//ms级延时程序voiddelay_s(unsignedintt)

8、;//s级延时程序voidadjust(void);//调整voidadjust_s(void);//粗调voidseekfire(void);//寻找火源voidfire(void);//灭火voidhf(void);intabs(intm);voidbizhan(void);//避障voidbiya(void);//避崖voidStage0(void);//阶段0voidStage1(void);//阶段1voidStage2(void);//阶段2voidSta

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。