black_button() assignment

A – Write a program that will cause your robot to wait until the black button is pressed.  When the button is pressed the robot spins counter-clockwise.  (hint: modify “printf()” and “motor()” functions in the previous example code.)

B – Write a program that goes forward for two seconds, then waits for the black button before going forward for another two seconds.

C – Write a program that make the robot spin counter-clockwise for two seconds, then spins clockwise for two seconds and then waits for the black button before going backwards.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s