資源簡介
舵機的使用是搬運比賽中提供的源程序非常有用,已經(jīng)實現(xiàn)過了

代碼片段和文件信息
/*////////////////////////////////
//公司:合肥凌翔信息科技有限公司
//時間:2012-06-30
//功能:機械臂搬運
*//////////////////////////////////
#include?“new_base.h“
#include?“my_port_redefine.h“
#include?“new_scan.h“
#include?“my_action.h“
const?prog_uchar?fuwei_matrix[?][COLUMN]={//該數(shù)據(jù)類型等信息,如若修改,應同時注意scan.c文件中的函數(shù),畢竟掃描對象是該矩陣
//PB0?PB1?PB2?PB3??PB4?PC0?PC1??PC2??PC3???PC4??PC5???PC6???PC7???PA5????PA6???PAC?time?type
??0??0??0??0???0??0??2??40??110??50???90???90???90???180??180??60SFS?
??0??0??0??0???0??0??2??40??110??50???90???90???90???180??180??60SFS?
??0??0??0??0???0??0??2??40??110??50???90???90???90???180??180??60SFS
};
void?fuwei(unsigned?char?step)
{
for(;step!=0;step--)
scan(fuwei_matrix02);
}
const?prog_uchar?zhua_one_matrix[?][COLUMN]={//該數(shù)據(jù)類型等信息,如若修改,應同時注意scan.c文件中的函數(shù),畢竟掃描對象是該矩陣
//PB0??PB1??PB2??PB3???PB4??PC0??PC1??PC2??PC3???PC4???PC5???PC6???PC7???PA5???PA6??PAC?time?type
??0????0??0????0???0????60??2??40??112??50???90???90???90???180??180??60SFS//0
??0????0??0????0???0????60??2??40??115??50???90???90???90???180??180??60SFS//1
??0????0??0????0???0????60??2??40??180??50???90???90???90???180??180??60SFS//2
??0????0??0????0???0????60??16040??180??50???90???90???90???180??180??60SFS//3
??0????0??0????0???0????60??165165?180??50???90???90???90???180??180??60SFS//4
??0????0??0????0???0????30??165165?180??50???90???90???90???180??180??60SFS//5
??0????0??0????0???0????30??10?10??180??50???90???90???90???180??180??60SFS//6
??0????0??0????0???0????30??10?10??180??100??90???90???90???180??180??60SFS//7
??0????0??0????0???0????30??165165?180??100??90???90???90???180??180??60SFS//8
??0????0??0????0???0????60??165165?180??100??90???90???90???180??180??60SFS//9
??0????0??0????0???0????60??10?10??180??100??90???90???90???180??180??60SFS//10
??0????0??0????0???0????60??10?10??180??50???90???90???90???180??180??60SFS//11
??0????0??0????0???0????60??2??40??110??50???90???90???90???180??180??60SFS//12
};
void?zhua_one(unsigned?char?step)
{
for(;step!=0;step--)
{?
scan(zhua_one_matrix012);
}
}
?
int?main(void)
{
/*?**************初始化****************/
init_port_servo();
init_port();
asm(“sei“::);
/*?**************初始化****************/
fuwei(1);
while(1)
{
zhua_one(1);
while(1);
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????138??2012-07-29?08:36??樣例程序\.dep\main.o.d
?????文件????????153??2012-07-29?08:36??樣例程序\.dep\my_aciton.o.d
?????文件????????108??2012-07-29?08:36??樣例程序\.dep\my_port_redefine.o.d
?????文件????????104??2012-07-29?08:36??樣例程序\.dep\new_ba
?????文件????????118??2012-07-29?08:36??樣例程序\.dep\new_scan.o.d
?????文件????????325??2012-07-29?08:36??樣例程序\avr_b.pnproj
?????文件?????????58??2012-07-29?08:36??樣例程序\avr_b.pnps
?????文件???????2682??2012-07-29?08:36??樣例程序\main.c
?????文件?????????13??2012-07-29?08:36??樣例程序\main.eep
?????文件??????18242??2012-07-29?08:36??樣例程序\main.elf
?????文件???????8694??2012-07-29?08:36??樣例程序\main.hex
?????文件??????55711??2012-07-29?08:36??樣例程序\main.lss
?????文件??????15092??2012-07-29?08:36??樣例程序\main.lst
?????文件??????30011??2012-07-29?08:36??樣例程序\main.map
?????文件???????6288??2012-07-29?08:36??樣例程序\main.o
?????文件?????????87??2012-07-29?08:36??樣例程序\main.ppg
?????文件???????2797??2012-07-29?08:36??樣例程序\main.sym
?????文件???????1872??2012-07-29?08:36??樣例程序\main_hex.aps
?????文件??????17507??2012-07-29?08:36??樣例程序\Makefile
?????文件????????254??2012-07-29?08:36??樣例程序\my_aciton.c
?????文件???????2854??2012-07-29?08:36??樣例程序\my_aciton.lst
?????文件???????3852??2012-07-29?08:36??樣例程序\my_aciton.o
?????文件????????115??2012-07-29?08:36??樣例程序\my_action.h
?????文件???????1185??2012-07-29?08:36??樣例程序\my_port_redefine.c
?????文件????????834??2012-07-29?08:36??樣例程序\my_port_redefine.h
?????文件???????9244??2012-07-29?08:36??樣例程序\my_port_redefine.lst
?????文件???????6992??2012-07-29?08:36??樣例程序\my_port_redefine.o
?????文件???????2006??2012-07-29?08:36??樣例程序\new_ba
?????文件????????830??2012-07-29?08:36??樣例程序\new_ba
?????文件??????16540??2012-07-29?08:36??樣例程序\new_ba
............此處省略11個文件信息
評論
共有 條評論