ImageVerifierCode 换一换
格式:DOCX , 页数:28 ,大小:16.47KB ,
资源ID:29792933      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/29792933.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(电赛寻线方案.docx)为本站会员(b****8)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

电赛寻线方案.docx

1、电赛寻线方案#includefindblack.h#define godelay 10#define stopdelay 40#define turndelay 25sbit beep=P37; char crossnum=0,x=1,y=1,crossflag=0,direction=dx,pingzi12=0;void delay(uint xms) uint i,j; for(i=xms;i0;i-) for(j=110;j0;j-); void find() if(G1=off&G2=off&G3=on&G4=off&G5=off) / 00100 go(100,100); if(G1

2、=off&G2=off&G3=off&G4=on&G5=off) / 00010 go(100,0); if(G1=off&G2=on&G3=off&G4=off&G5=off) / 01000 go(0,100); if(G1=off&G2=off&G3=on&G4=on&G5=off) / 00110 go(100,0); if(G1=off&G2=on&G3=on&G4=off&G5=off) / 01100 go(0,100); if(G1=off&G2=off&G3=off&G4=off&G5=on) / 00001 go(100,0); if(G1=on&G2=off&G3=off

3、&G4=off&G5=off) / 10000 go(0,100); if(G1=on&G2=on&G3=on&G4=on&G5=on) / 11111 go(100,100); delay(godelay); go(0,0);beep=0; delay(stopdelay);beep=1; crossflag=1; if(G1=on&G2=on&G4=off&G5=off) / 11*00 go(100,100); delay(godelay); go(0,0);beep=0; delay(stopdelay);beep=1; crossflag=1; if(G1=off&G2=off&G4

4、=on&G5=on) / 00*11 go(100,100); delay(godelay); go(0,0);beep=0; delay(stopdelay);beep=1; crossflag=1; if(G1=off&G2=off&G3=off&G4=off&G5=off) / 00000 go(50,50); void zoufangge() find(); / WriteString(x=,0,0); WriteChar(x+48,2,0);/ WriteString(,y=,3,0); WriteChar(y+48,6,0);/ if(direction=dy)/ WriteStr

5、ing(,dir=y,7,0); / if(direction=dfy)/ WriteString(,dir=-y,7,0); / if(direction=dx)/ WriteString(,dir=x,7,0); / if(direction=dfx)/ WriteString(,dir=-x,7,0); if(down1=0|down2=0|down3=0) /正立瓶子 left_turn_90_degree(); if(direction=dx) direction=dy; else if(direction=dy) direction=dfx; else if(direction=d

6、fx) direction=dfy; else if(direction=dfy) direction=dx; else if(up1=0|up2=0|up3=0) /倒立瓶子 right_turn_90_degree(); if(direction=dx) direction=dfy; else if(direction=dy) direction=dx; else if(direction=dfx) direction=dy; else if(direction=dfy) direction=dfx; if(crossflag=1) crossflag=0; if(direction=dx

7、)x+; else if(direction=dfx)x-; else if(direction=dy)y+; else if(direction=dfy)y-; if(x=6&y=3) go(0,0); while(1); if(x=1&y=1) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=2&y=1) if(directi

8、on=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=3&y=1) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direct

9、ion=dy; if(x=4&y=1) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=5&y=1) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx)

10、right_turn_90_degree(); direction=dy; if(x=6&y=1) if(direction=dy) /go if(direction=dx) left_turn_90_degree(); direction=dy; if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=1&y=2) if(direction=dy) /go if(direction=dx) /go if(directi

11、on=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=2&y=2) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=3&y=2) if(direction=dy) /go i

12、f(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=4&y=2) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x

13、=5&y=2) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=6&y=2) if(direction=dy) /go if(direction=dx) left_turn_90_degree(); direction=dy; if(direction=dfy) / if(direction=dfx) / if(x=1&y=3)

14、if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dfx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=2&y=3) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_t

15、urn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=3&y=3) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dfx; if(x=4&y=3) i

16、f(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=5&y=3) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_tur

17、n_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=6&y=3) if(x=0&y=1) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=0&y=2) if(direction=dy) /go if(di

18、rection=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=0&y=3) if(direction=dy) /go if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=0&y

19、=4) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=1&y=4) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) lef

20、t_turn_90_degree(); direction=dfx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=2&y=4) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dfx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=3&y=

21、4) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=4&y=4) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) left_turn_90_degree(); direction=dx; if(direction=dfx) right_turn_90_degree(); direction=dy; if(x=5&y=4) if(direction=dy) right_turn_90_degree(); direction=dx; if(direction=dx) /go if(direction=dfy) /go if(direction=dfx) right_turn_90_degree(); direction=dy;

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1