Unformatted text preview: ◦ Use if statements. ◦ Use while loops. ◦ Program in pairs. Behaviors (pick three) 1. lightSeeker() Create a robot behavior that runs toward the light. 2. avoid() Create a robot behavior that runs away from obstacles triggering the infrared detectors. 3. securityGuard() Do you have a feeling your roommate is snooping through your desk drawer? Write a program that detects if the drawer is opened and takes and saves a picture of the oﬀender and then beeps loudly. 4. digitalCamera() Write a function that takes and displays a picture when the light sensor is pressed. The left light sensor should take a color picture ( takePicture() ) and the right sensor should take a gray-scale picture ( takePicture(’gray’) ). Feel free to say “Cheese” before snapping the picture. CMSC 143 (Fall 2010): Lab 3 1 of 1...
View Full Document
This note was uploaded on 10/14/2010 for the course CMSC 143 taught by Professor Keitho'hara during the Spring '10 term at Bard College.
- Spring '10