ReePrime
Robot autonome

Hosted by Dailymotion. For legal issues report at the Copyright Center, report us on DMC, or use the Instant Removal tool.

Robot autonome

G
General_MacGyver

1 Views • Oct 03, 2008

Description

Voilà le robot programmé en basic :

' Robotics with the Boe-Bot - ForwardLeftRightBackward.bs2
' Move forward, left, right, then backward for testing and tuning.

' {$STAMP BS2}
' {$PBASIC 2.5}

DEBUG "Program Running!"

counter VAR Word

FREQOUT 4, 2000, 3000 ' Signal program start/reset

FOR counter = 1 TO 64 ' Forward
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
NEXT

PAUSE 200
FOR counter = 1 TO 24 ' Rotate left - about 1/4 turn
PULSOUT 13, 650
PULSOUT 12, 650
PAUSE 20
NEXT

PAUSE 200
FOR counter = 1 TO 24 ' Rotate right - about 1/4 turn
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
NEXT

PAUSE 200
FOR counter = 1 TO 64 ' Backward
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
NEXT

END