280 likes | 391 Views
NXT-G Online Professional Development Classes will begin at 1:00pm EDT. Welcome. Turning programs Abstraction Bridges Underlying Structure This week Robot or Not? Sensors Behaviors Thresholds. Underlying Math Structure. Abstraction Bridge Same question, different context
E N D
NXT-GOnline Professional DevelopmentClasses will begin at 1:00pm EDT
Welcome • Turning programs • Abstraction Bridges • Underlying Structure • This week • Robot or Not? • Sensors • Behaviors • Thresholds
Underlying Math Structure • 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?
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? • Thermostat • iPhone • 1908 Ford Model T • 2008 Ford Focus
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 • Check Your Understanding at the end of each video • If you finish early, start the Continue challenge • Press the “checkmark” button when you are on the Continue challenge
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” this block? • How long did it stay inside a Move Degrees block?
Wait Block • What does the Wait for Touch Block do? • It waits. • Like a hawk. • Or a tiger. • 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 program is only in one place at a time* • Many misbehaviors occur when the program is in the wrong place at the wrong time • “Tracing” through the program
Meet the Family • Touch Sensor • Ultrasonic Sensor (next!) • Light Sensor • Sound Sensor
NVT Move until Near • Lab: NVT Move until Near • Check Your Understanding at the end of each video • If you finish early, start the Continue challenge • Press the “checkmark” button when you are on the Continue challenge • If you finish early: • What does Move Until Near have in common with Move Until Touch?
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 • Stop, or stop not. There is no try. • Near, or not near. There is no in-between.
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 • Check Your Understanding at the end of each video • If you finish early, start the Continue challenge
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?
Revisiting Preconceptions • What can you teach with a robot? • Additions for today?
Homework • Troubleshooting Problem • In the (HW3) 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 programming problem • 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 • Class activity: Preconceptions about what you can teach with robots • Teacher concept: Addressing your own preconceptions • Class activity: Move until Touch, Behaviors • Class activity: Move until Near, Thresholds • Math concept: Thresholds and Comparisons • Class activity: Move until Dark, Calculated Thresholds • Math concept: Statistics and Data • Math concept: Calculating Means