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

Rehg, James A. Introduction to Robotics in CIM Systems, 5 th Edition, Prentice H

ID: 3581312 • Letter: R

Question

Rehg, James A. Introduction to Robotics in CIM Systems, 5th Edition, Prentice Hall, 2003 Martin, F. G., Robotic Explorations: A Hands-on Introduction to Engineering, Prentice-Hall,

Save Answers QUESTION 1 5 points The software PBASIC allows you to write programs for your BASIC Stamp 2 microcontroller. Translate the following program written in PBASIC and determine the value of the variable Y that the debug command prints to the screen. Stamp bs23 A var word B var word C var word var word var word A 2 B 2 D 8 A B C D debug "results sdec Y QUESTION 2 5 points 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 250 PULSOUT 13, 850 P13 servo counterclockwise PULSOUT 12,650 P12 servo clockwise PAUSE 20 NEXT END

Explanation / Answer

Question 1:

Given that

A = 2

B = 2

C = 5

D = 8

Y = A + B * C + D

= 2 + 2 * 5 + 8

= 2 + 10 + 8

= 20

Therefore; That debugs the command prints to the screen is 20.