330 likes | 430 Views
NXT-G Online Professional Development Classes will begin at 1:00pm EDT. Warm-up Problem Make your robot go one meter in exactly one try!. Welcome. Review Abstraction Bridges Moving and Turning This week Program Flow Sensors Behaviors Thresholds. Part 1 Review. Review.
E N D
NXT-GOnline Professional DevelopmentClasses will begin at 1:00pm EDT Warm-up Problem Make your robot go one meter in exactly one try!
Welcome • Review • Abstraction Bridges • Moving and Turning • This week • Program Flow • Sensors • Behaviors • Thresholds
Review • Math and Abstraction Bridges* • Math is a problem-solving tool with many variants • It solves robot problems, it solves “mall” problems • The key: Relationships between quantities • Moving and Turning • Move Block • Duration • Power • Steering • Blocks run in order • More on this in a second… * = More slides available at end
Program Flow • This is a Big Idea in programming • Blocks run in order • Every block is a command • The “flow” between blocks is critical • The program is only “in” one block at a time • You can follow the blocks to see what the robot is doing • When something goes wrong, follow the trail of blocks!
Program Flow • EXERCISE: Explain your Labyrinth program in terms of blocks and program flow
What is a Robot? • Are the following robots? • Digital Thermostat • iPhone • 1908 Ford Model T • 2008 Ford Focus • Yes or No • More robotic characteristics • Less robotic characteristics
What is a Robot? • Sense, Plan, Act • Sense the environment • Have a Plan to react intelligently • Act to carry out the plan
NVT Move until Touch • Lab: NVT Move until Touch 1-6 only • Check Your Understanding at the end of each video • If you finish early, checkmark and continue on • Press the “checkmark” button when you finish Step 6
Move Unlimited Block • What does the Move Block do when you set duration to “Unlimited”? • “Unlimited” means “not limited” • The duration of the movement is not limited by this Move Block • The motors start, and the program moves on. This Move Block is no longer responsible for – or capable of – stopping the motors at the right time.
Move Unlimited Block • Remember Program Flow! • How long does the program stay “inside” the Move Unlimited block? • How long did it stay inside a Move Degrees block?
Wait Block • What does the Wait for Touch Block do? • It waits. • Until the sensoris touched. • That’s it. • Does it run the motors? • Nope. • Does it stop the motors? • Nope.
Move Stop Block • What does this block look for before stopping? • Absolutely nothing
Move Until Behavior • The whole is more than the sum of its parts • And yet, it is not… • Step through the blocks • Every block does literally what it says • The meaning of the “sentence” is different from the meaning of the individual “words”
Behaviors • Every block is a behavior • Small behaviors can be combined into bigger ones, like words in a sentence • Every word can matter… • “Jump in!” • “Jump in a lake!”
Program Flow • The collective behavior is a result of the program flowing through the blocks • Many misbehaviors occur when the program gets to the wrong block at the wrong time • “Trace” through the program during troubleshooting
Meet the Family • Touch Sensor • Ultrasonic Sensor (next!) • Light Sensor • Sound Sensor
NVT Move until Near • Lab: NVT Move until Near 1-6 only • Check Your Understanding at the end of each video • Press the “checkmark” button when you finish step 6 • If you finish early: • What does Move Until Near have in common with Move Until Touch? • Continue on with the steps
Move Until Behaviors • What do Move Until programs have in common? • “Move Until” programs… • Start moving forward • Wait for something to happen (Touch, Near) • Stop
Thresholds • What’s significantly different about using the Ultrasonic Sensor? • Thresholds • Divide a continuum of possibilities into two unambiguous categories
Threshold Math • An incoming value is either above or below the threshold • An incoming value is either greater than > or less than < the threshold • The Wait Block waits “until” the value is “less than” 50. • Note that this exact wording breaks ties – 50 is not “less than” 50.
Meet the Family • Touch Sensor • Ultrasonic Sensor • Light Sensor (next!) • Sound Sensor
Light Sensor • “Active” light sensor • What is being read? • Incoming light • Most of this is reflected lightfrom the red bulb • But not all… interference is common • What are the units of Light Sensor measurement? • None • Relative value only, unlike the physical cm or in of the Ultrasonic • Must be “calibrated” before use • View Mode readings and calculations
NVT Move until Dark • Lab: NVT Move until Dark 1-8 • Check Your Understanding at the end of each video • If you finish early, continue on
Calculated Threshold • Light Sensor Threshold • (Light + Dark) / 2 • What is the basis for this calculation? • Goal: Distinguish Dark from Light • Where should the dividing line be? • WebEx Whiteboard explanation • Midpoint of a number line • Is this the only legitimate way to calculate Light Sensor threshold?
What can you teach with a robot? So far: • Science, Technology, Engineering, Mathematics • Programming, Automation • Algebra, physics • Money, jobs • Teamwork, problem solving, social skills, creativity, expression, high level thinking, decision making • Documentation, technical lingo, reading and writing technical material • Scaling (math) Add new ideas here
Homework Outdated: Use the Assignment sheet and not this • Troubleshooting Problem • In the (Wk3) forum, we will post a student program with an error • You must help to guide the student back onto the correct path • This will involve more than just finding the coding error • Complete NVT Move until Sound • NXT Video Trainer > Behaviors > Move until Sound • Submit final program .RBT file • Intentionally hard: Get as far as you can • Complete Ultrasonic Sensor and Light Sensor “Continue” Challenges • Submit final program .RBT files
Closing Thoughts • Review: Math, Moving, Turning • Teacher concept: Math as Tool • Programming concept: Move Blocks • Class activity: Move until Touch, Program Flow, Behaviors • Programming concept: Program Flow • Programming concept: Wait Blocks and “Forward Until” behaviors • Class activity: Move until Near, Thresholds • Math concept: Thresholds and Comparisons • Class activity: Move until Dark, Calculated Thresholds • Math concept: Calculating Midpoints on a Number Line
Underlying Math Structure • Abstraction Bridge • Problem-pair is one type of Abstraction Bridge • Same question, different context • Are these the same question? • 20 cm in 412 degrees, find deg/cm • 200 mi in 41.2 dollars, find mi/$ • Are these the same question? • 120 cm is 80% of the total. How many cm to go? • 80% of 30 questions were correct. How many wrong?
Replicating vs. Partitioning • Inverse operation error • Multiplying when should divide • Dividing when should multiply • Inverting fractions • Ask yourself: • Am I making “copies” of something to fill up a space? • Am I “partitioning” a space into smaller pieces? • How many times?