200 likes | 273 Views
Student: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.”. Warm-up Problem. A student’s program and comments are shown above. Find the mistake in this program and describe a fix for it.
E N D
Student: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.” Warm-up Problem A student’s program and comments are shown above. • Find the mistake in this program and describe a fix for it. • What actions or steps would you take to help this student?
Student Program and Problem Description: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.” Troubleshooting Perspectives • FLL is about student growth • How does it help a student to grow if you solve the problem for him or her?
Student Program and Problem Description: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.” Troubleshooting Perspectives • On the other hand… • Students can’t grow if they’re totally stuck! • How do you help a student who needs help, without solving the problem directly?
Troubleshooting Perspectives • How do you direct someone to your house? • Tell them where your house is • Figure out their own location • Find their own route • Pick them up and take them there • See the sights, but don’t learn the route • Guide them • Take into account where they are • Figure out the best route, given their starting point
Troubleshooting Perspectives • To truly help your students: • Be able to solve the problem yourself • That’s why you’re in this class, right? • Guide students to a solution (don’t “tell” or do it for them) • Follow the STAR: • Student’s intent: What does the student THINK should be happening based on his or her current understanding? • Trace: Trace through the program to identify where the robot’s behavior diverges from the student’s intent • Analyze: What did the student misunderstand? • Revise: Correct the student’s misunderstanding, then change the program to reflect the new understanding
Student Program and Problem Description: “I want my robot to move close to the wall then stop, but it doesn’t seem to care about the wall at all.” Troubleshooting Perspectives • How would you troubleshoot this now? • STAR: Student’s intent, Trace, Analyze, Revise
Methods of Repetition • Back to programming! • Intersections Challenge • Write it four times (manual method) • Write it once then copy-paste • Write it once then have the computer repeat it • Teach the computer how to do it once,then tell it to run four times
NVT Repeating Behaviors • Lab: NVT Repeating Behaviors 1-7 only • Check Your Understanding at the end of each video • If you finish early, check in and continue on • Say “done” when you finish Step 7
Loop Block • Controls Program Flow • Trace through this program • Compare to other blocks • How does Move Unlimited affect program flow? • How does Move Duration affect program flow? • How does Wait For affect program flow?
Controlled Loop Block • Limited control over how much looping • Count = Number of times • Sensor = Sensor value (similar to Wait) Sensor value only checked HERE
Looping Limitations • At the end of Repeating Behaviors step 7… • Robot stops correctly if it sees an obstacle just after turning • Why? • Robot does not stop correctly if it sees an obstacle while moving • Why not?
NVT Obstacle Detection • Solve the problem by changing the way we think about behaviors and movement • Lab: NVT Obstacle Detection 1-7 only • Check Your Understanding at the end of each video • If you finish early, check in and continue on • Say “done” when you finish steps 1-7
Switches • Controlling program flow in a different way • Choose between blocks based on a sensor value • Different from waiting or looping
Switches • Switches exist by themselves, but aren’t often seen alone in NXT-G
Switch-Loops • Switch-Loops • Much more common • Much more useful • Repeated observation and reaction • The illusion of continuity • Same technique as animation • Fragile! Rules: • Don’t feed after midnight • Don’t jam the loop with Waits • Some sensors require extra care (Rotation reset) • SAVE EXTRA OFTEN
Line Tracking • Light Sensor Thresholds • (Light+Dark)/2 • Very close relative of Obstacle Detection • Instead of near/far, decide based on dark/light • When do you see “dark”? • When do you see “light”? • Emergent behaviors
For Next Week… • Complete NVT Line Following • NXT Video Trainer > Behaviors > Line Following • ERRATA: NVT 1.0 Line Following 9 missing “Unlimited”s • Build the Obstacle Course • NVT > Challenges > Obstacle Course > 1 to see the course • NVT > Challenges > Obstacle Course > 2 for setup instructions
Closing Thoughts • Class activity: Troubleshooting • Mentor concept: Growth through Troubleshooting • Coach concept: STAR method • Class activity: Repeating Behaviors • Programming concept: Controlling Program Flow • Class activity: Obstacle Detection • Programming concept: The Illusion of Continuity