走迷宫机器人C++源码

时间:2011-10-23 12:54:53
【文件属性】:

文件名称:走迷宫机器人C++源码

文件大小:3KB

文件格式:RAR

更新时间:2011-10-23 12:54:53

走迷宫机器人C++源码

void Senser_reading() { int downfront_temp=0,downleft_temp=0,downright_temp=0; int upfront_temp=0,upleft_temp=0,upright_temp=0; int balance_temp=0,balance_right_temp=0; int loop; for(loop=0;loop<100;loop++) { if(IORD_ALTERA_AVALON_PIO_DATA(DOWNFRONT_BASE)) downfront_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(DOWNLEFT_BASE)) downleft_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(DOWNRIGHT_BASE)) downright_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(UPFRONT_BASE)) upfront_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(UPLEFT_BASE)) upleft_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(UPRIGHT_BASE)) upright_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(BALANCE_BASE)) balance_temp++; if(IORD_ALTERA_AVALON_PIO_DATA(BALANCE_RIGHT_BASE)) balance_right_temp++; } switch(downfront_temp)


【文件预览】:
www.pudn.com.txt
Maze_solver.txt

网友评论

  • 注释不多啊,看起来慢