วันพฤหัสบดีที่ ๒๑ ธันวาคม พ.ศ. ๒๕๔๙

สนามแข่ง Robot Demo

การนำหุ่นยนต์เดินตามเส้นมาประยุกต์เป็นหุ่นยนต์ต่อสู้ โดยการติดตั้ง Sensor IR เพิ่ม และ Switch ที่ใช้สำหรับการหยุด เมื่อแพ้
--------------------------------
Implementation Rules
1.You can set up any equipments from robot chassis not
over 2 inch
2.two contact switch must push at both wheel side and
must not push over 2 inch from the ground
3.not allow to use remote
4.when switch is on.Robot must wait 5 second to
operate (safety rule)
5.when robot has been touch,attack,press at
switch.Robot must immediate shut off.

Lose Win Rule
1.If Robot is walking out of battle field.(count from
chassis)It is lose.
2.If Robot has been touch,attack ,press contact switch
by opponent robot of any obstacle and the red led is
on.This robot is lose
3.If Robot can not move or stick to something and
can't do operation for 10 sec . This robot is lose
4.In the demo. at least 4 robots are the competitors.
The last man standing is the winner.

P.S I also attach my own sourcecode for my
robot(Unperfect yet)for learning how it work.The most
considering is in delay subprogram.You must check
contact switch for killing your(Robot)self in this
subprogram because it has been use over the program.

Thanks

Ataya P (Joichi)
--------------------------------
สนามที่ใช้ในการแข่งขันมีการเปลี่ยนแปลงเล็กน้อยครับ




































ตำแหน่งที่ติดตั้ง switch



















การควบคุมองศาการเลี้ยว ความละเอียดที่ 45 องศา


ตัวอย่าง:
เมื่อเจอขอบสนาม จะให้หุ่นถอดหลังแล้วเลี้ยง 45 องศา
Sensor ติดตั้งที่ ADC6
'--------
' ถอดหลัง 2 step
'--------
cnt=0
GOSUB backward
DO
CH = 6 : GOSUB RDADC ' Read Position First Time
IF (sdADC < ch =" 6"> 100) ' Wait Until Reflect
CNT = CNT + 1 ' Increment Counter
' DEBUG DEC CNT ' Show Counter On Debug terminal
ENDIF
LOOP UNTIL (CNT > 2) ' ถอดหลัง 2 step
'-----------
' เลี้ยว 45
'-----------
cnt=0
GOSUB rotate:PAUSE 100
DO
CH = 6 : GOSUB RDADC ' Read Position First Time
IF (sdADC < ch =" 6"> 100) ' Wait Until Reflect
CNT = CNT + 1 ' Increment Counter
' DEBUG DEC CNT ' Show Counter On Debug terminal
ENDIF
LOOP UNTIL (CNT > 1 ' 1step 45 degree
GOSUB break:PAUSE 100
GOSUB forward' : PAUSE 100
-------------------------------------


ไม่มีความคิดเห็น: