Shop OBEX P1 Docs P2 Docs Learn Events
Need help with Boe-Bot coding terms — Parallax Forums

Need help with Boe-Bot coding terms

QuantumGQuantumG Posts: 1
edited 2011-12-30 19:03 in General Discussion
See ive been working on the boe-bot for a while now. I think i know what these terms are but im not sure because i want to explain to my friend what in doing and what the terms in the lines in coding do. Well bottom line ive read the manual and im not sure im correct on what these terms mean so i would like your help.

' Robotics with the Boe-Bot - BoeBotForwardThreeSeconds.bs2
' Make the Boe-Bot roll forward for three seconds.

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

DEBUG "Program Running!"

counter VAR Word

pulseCount VAR Word

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

FOR pulseCount = 1 TO 100 ' Loop ramps up for 100 pulses.
PULSOUT 13, 750 + pulseCount ' Pulse = 1.5 ms + pulseCount
PULSOUT 12, 750 - pulseCount ' Pulse = 1.5 ms - pulseCount
PAUSE 20

NEXT

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

NEXT

PAUSE 200

FOR counter = 1 TO 175 ' Rotate left - about 1, Single wheel turn
PULSOUT 13, 650
PULSOUT 12, 750
PAUSE 20

NEXT

FOR pulseCount = 1 TO 100 ' Loop ramps up for 100 pulses.
PULSOUT 13, 750 - pulseCount ' Pulse = 1.5 ms + pulseCount
PULSOUT 12, 750 + pulseCount ' Pulse = 1.5 ms - pulseCount
PAUSE 20

NEXT

FOR counter = 1 TO 525 'Backward
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20

NEXT

PAUSE 200

FOR counter = 1 TO 90 ' Rotate right - about 1, 2 wheel turn
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20

NEXT

PAUSE 200


END

Well now what i need is know what the following terms mean and do:
- Debug
- Pulses
- Pulsout
- Freqout
and...
- what the numbers right after Pulsout mean
- what the -/+ Pulscount mean

Simple description would be helpful :)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-12-30 19:03
    There is a good explanation in the Basic Stamp Syntax and Reference Manual which you can download from Parallax. You can file this also in the Stamp Editor's help files. There's a chapter on each of these statements / commands and the stuff after the statement name is described complete with examples. The descriptions in the Manual are pretty complete and there's no point in restating them here unless there's something specific you don't understand after reading them.
Sign In or Register to comment.