- 1、本文档共25页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
基于xs128光电高级处理程序(Based on xs128 photoelectric advanced processing program)
基于xs128光电高级处理程序(Based on xs128 photoelectric advanced processing program)
uchar image _ data [row] [points];
uchar image [row] [points];
uchar mid _ image [row];
uchar hung _ a;
uchar image _ ok = 0;
uchar row _ count = 1;
uchar points _ count = 0;
uchar line _ c = 0;
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * 起始线识别 * * * * * * * * * * * * * * * * * * * * * * * * * * * /
# define left _ part 1
# define right _ part 2
# define all _ indent 3
# define time1 500
# define time2 12
uchar start _ line _ flag = 0;
uint start _ line _ enable = time1;
uchar hour _ a = 0;
uchar part _ pixels = 0;
uchar speed _ lock = 40;
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
uchar speed = 0;
uchar idear = 0;
uchar speed _ goal = 50;
uchar nrf _ speed = 0;
struct speed _ parameter speed _ strategy;
uchar shache = 0;
uint steer _ memory = mid _ steer;
unsigned char ad _ data [2];
which unsigned char get _ row [row] = {25,35,45,55,65,75,85,95105115125135145155165175185195200};
/ * * * * * * * * * * * * * * * * * * * * * * * * * 函数声明 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
uchar _ straight (uchar hung);
char _ road (uchar hung);
int get _ k _ steer (void);
void give _ speed (uint pwm);
void steer _ ctrl ();
int pid _ control (void);
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
功能: 判断是否为直道
入口参数: 无
返回值: 1 - - 直道, 0 - - 弯道
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
uchar _ straight (uchar hung)
{
uchar in;
uint sum = 0;
if (hung 8)
{
in = hung;
(; i 0; i --)
{
sum + = abs (mid _ image [in] - mid _ image [- 1]);
}
if (sum row 3) return 1;
}
return 0;
}
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
功能: 判断左右弯
入口参数: 无
返回值: 正数 - -
您可能关注的文档
- 国家企业培训师专业能力操作训练题(The national enterprise training professional ability to operate the training exercises).doc
- 国家计算机三级信息管理技术150题--计算机基础知识部分(精华)(National computer three level information management technology 150 questions - computer basic knowledge part (essence)).doc
- 国家计算机二级考试公共基础知识教材(National computer grade two examination of public basic knowledge teaching).doc
- 国家锅炉压力容器检查协会(nb) 简介(Boiler and Pressure Vessel Inspection Association (NB).).doc
- 国寿福禄鑫尊两全保险(分红型)投保示例(China Life Fu Lu Xin respect of endowment insurance (participating) for example).doc
- 国庆促销(National Day Promotion).doc
- 国有土地上房屋征收评估办法发布(全文)(Announcement on assessment of housing levy on state owned land (Quan Wen)).doc
- 国有企业精益薪酬管理初探管理(Lean management of salary management in state-owned enterprises).doc
- 国有商业银行股份制改造国际经验和启示(The state-owned commercial bank shareholding reform of international experience and Enlightenment).doc
- 国美苏宁狂吻b2c(Gome Suning kissed B2C).doc
- 基于一化平台的息化供公司系统建设(The construction of a platform for information system based on).doc
- 基于专题网站的小组协作学习模式的教改试验 - 广东工业大学邮件系统(The reform of Guangdong University of Technology test group collaborative model of e-mail system based on website).doc
- 基于企业中期战略的绩效指标体系设计(The design of performance index system of enterprise based on the medium-term strategy).doc
- 基于单片机的软件实现pid温度控制系统(Software implementation of PID temperature control system based on single chip microcomputer).doc
- 基于建构主义原真性理论对非物质文化遗产旅游开发的解读(Constructivism authenticity theoretical interpretation of the intangible cultural heritage tourism development based on).doc
- 基于建模推理与数据库的电力系统保护信息分析管理专家系统(Expert system for information analysis and management of power system protection based on modeling reasoning and database).doc
- 基于形态学和神经网络的车牌识别算法(The license plate recognition algorithm based on neural network and morphology).doc
- 基于成本领先战略的企业成本持续改进分析(Cost analysis of cost leading strategy of enterprise based on continuous improvement).doc
- 基于 gabor变换和 bp神经网络的 人脸检测算法的 m atlab实现(Face detection algorithm based on Gabor transform and BP neural network m implementation based on atlab).doc
- 基于机制设计理论的大学生跳槽现象解析(Mechanism design theory of college students based on the analysis of the phenomenon of job hopping).doc
最近下载
- 机房接地电阻测试记录.doc VIP
- 获得性血友病A诊断与治疗中国指南(2021年版).pdf VIP
- 2025年天津武清中考语文试题及答案.doc VIP
- H13钢的高温拉伸性能研究.pdf VIP
- 04D201-3室外变压器安装图集.pdf VIP
- Agentic RAG 的现在与未来.pdf VIP
- T_ZZB 3718—2024(纸质卡牌_标准).pdf VIP
- 建筑材料行业研究简报:华东水泥创新高,巨石业绩持续高增长.pdf VIP
- 东风风神-AX4-产品使用说明书-风神AX4 2017款 1.4T DCT潮尚型-DFM7141F3B-AX4使用手册201710.pdf VIP
- 工程设计项目拟投入设计人员及设备.docx VIP
文档评论(0)