Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The BASIC Stamp program shown below will operate the Boe-Bot in a straight line.

ID: 3771100 • Letter: T

Question

The BASIC Stamp program shown below will operate the Boe-Bot in a straight line.    For how many seconds will the robot operate? Recall that for each FOR-NEXT loop, the pulse to P13 is 1.7 ms, the pulse to P12 is 1.3 ms, the pause duration is 20 ms, and the software overhead is 1.6 ms.

'{$STAMP BS2}

'{$PBASIC 2.5}

DEBUG "Program Running!"

counter VAR Word

FOR counter = 1 TO 120

PULSOUT 13, 850                 ' P13 servo counterclockwise

PULSOUT 12, 650                 ' P12 servo clockwise

PAUSE 20

NEXT

END

The BASIC Stamp program shown below will operate the Boe-Bot in a straight line.    For how many seconds will the robot operate? Recall that for each FOR-NEXT loop, the pulse to P13 is 1.7 ms, the pulse to P12 is 1.3 ms, the pause duration is 20 ms, and the software overhead is 1.6 ms

Explanation / Answer

P13 takes 1.7

P12 takes 1.3

Software over head is 1.6 for these pause duration 20ms

The reciprocal of 1.7+1.3+=4.6 ms

4.6ms/1000=0.0046s      

1/0.0046s=217.392 per second