|
THS
|
Robots /
SmallStarterProgramsTEAMS Academy 91.110 Interactive Robotics – Introductory C programming assignments
As soon as you finish these tasks, you can move on to the good stuff! (TEAMS Grand Prix and more!!) Here are the task descriptions…stick to the task and don’t add any other functionality (KISS principle)!! 1. The play LED blinks on and off until the play button is pressed, then the play LED stays on. The Power LED is green always. 2. Start the robot driving and turn on the play light, Power LED = green. When the robot encounters an unsafe driving situation (you need to define “unsafe”), beep error and blink the power LED on and off (bright red). What should you do with the play light?? When the robot is in a safe state, the Power LED is on and green. 3. Start the robot driving and turn on the play light, Power LED = green. When play is pressed, the robot accelerates from current velocity up to 200 mm/sec in a reasonable manner (use a "for" loop). When advance is pressed, the robot decelerates from current velocity down to -200 mm/sec in a reasonable manner (use a "for" loop). 4. When the left bumper is pressed, play a short song and turn on left CM led. When the right bumper is pressed, turn on advance LED and right CM LED. When both are pressed, turn on both CM LEDs, but nothing else. Power LED on and green the whole time, and the advance LED should blink on & off. Max's Song Example:
5. Drive at a increasing but reasonable speed in an outward spiral (hint: use a variable for r or left-right wheel velocities and change how?). If any cliff sensor detects a large color change, reverse direction. If any bumper is hit, reduce speed by half and beep. If advance button pressed, stop and beep. Power LED green the whole time you are moving, red when you are not. When you come to a stop, blink advance LED on and off. |