SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Robotics: Lego Mindstorm NXT

 Stage 2: Programming
Time to Program!

You just built your starting robot! Congrats, now it’s
 ready for action. Oh wait, it’s just sitting there isn’t it…

That’s because you didn’t give it a program yet, therefore,
 it doesn’t know what to do yet!

So let’s learn how to program!
Change How You Think
Remember when I told you the most important thing you have
  to do it change how you think?
Well now is when you learn why.

To program, you have to understand how to think like a
  computer. And that’s to be able to think with algorithms,
  which is the computers thought process. You take for
  granted how easy it comes for people to be able to think and
  then act off that impulse, so we’re going to make you do an
  exercise to learn how to think like a programmed robot.
Stop and get programmed
We are going to put you in groups of two. One volunteer to be
 the robot, the other is the programmer.

Now blindfold the volunteered robot, arrange an obstacle
 course in our room, and the programmer verbally direct the
 “robot” through it. (i.e.“Take 3 steps, stop, turn left 90
 degrees, stop, take 4 steps, stop, etc.”)

And the robot can’t feel around, keep arms to the side.
What did you learn?
You probably noticed that it was harder to get around when
  you couldn’t think for yourself as the robot. And if you were
  the programmer, you must have had to think pretty detailed
  on what directions to give and how.

That’s the point. Robots can’t think for themselves, they need
  exact directions. When you program your robot you are
  going to need to know where you want it to go, how far,
  what direction, when to turn, when to stop, etc.
Programming with NXT
Now that your mindset is
 in programmer mode,
 let’s Mindstorm!
 (corny pun)

Lucky for you, NXT
  programming is not
  that complicated.
Basics
The goal of this week is for you to learn how to program on
  your own and be as creative with it as you want. So we
  aren’t going to give a strict guideline on how to program
  your robots, the goal is to learn the basics and program your
  robot anyway you see best!

                           Once you start learning the basics you
                           might discover better ways to program
                           than the other teams or the instructors,
                           don’t hesitate to be creative.
Movement
You make NXT programs
  like you are putting Lego
  blocks together.
Movement blocks are one of
  the most used actions in
  programming. You can
  decide what servo to
  activate with them,
  direction, and for what
  duration. (Duration will
  be important later)
Sound Blocks

When you activate these
 blocks you can make
 your robot play a sound
 from the files in the
 NXT programer
Switch
         When you need to program a
           function for a sensor, you use the
           switch function. It allows you to
           program exactly what the robot
           should do if a sensor is tripped.
         Example: Touch sensor trips,
           program to move back 2 rotations,
           then turn right, continue to next
           function.
Wait button
The wait function is
  necessary for when
  you want your
  robot to act until it
  trips a sensor. So if
  you want the robot
  to act a certain way
  when it trips a
  certain sensor, you
  will use the wait
  botton.
Loopty Loop


   Loops are very handy, they
     contain a program you want to
     repeat. It can repeat once until
     forever if you like.
Stop: It has to at some point!
The most important thing you need to learn in programming is
  how to stop! We don’t get paid enough to do this forever!

                                You will want to program
                                  your robot to stop at some
                                  point.
                                Remember that you can
                                  program the stop function
                                  into a loop or sensor
                                  action.
Making the Distance
Remember the movement blocks? When you want to program
  your robot to go a certain distance, how do you know how
  long to make it run?

Well, you don’t. The fact that any robot you make can move
 different than other robots means that you have to find out
 how far it will go on your own.

We have a handout ready to help you write down your data.
The reason we suggest using “rotations” instead of “seconds” to
  run the movement blocks is because it is easier to figure out
  how many rotations it takes to go a certain distance. Basic
  math will figure out longer distances.

        ď‚— Le sg totheP g m ingHa o
            t’ o      ro ra m   nd ut
Stage 3
Now that you have
 collected your data on                                    (Obstacle2)


 distance, you can             (Obstacle3)
                                             (Obstacle1)
 accurately program your
 robotic system around
 our obstacle course. The
 course floor plan will
 vary depending on what
 location you are in, but it                    Start

 will look something like       Finish
 this.
Competition
We will have a friendly competition to see what team has
 programmed their robot with more skill. The team that
 completes our course with the best time wins.

However, when the competition is complete, you can readily
 get back into teams and begin to create more robotic
 creations.

The point of all three stages was to teach you how to create and
  program NXT robots, so be creative and have fun!
Additional Designs
There are some additional designs in the Lego NXT program,
  but if you want to find designs off the internet go to the
  following sites:

ď‚— www.nxtprograms.com


ď‚— http://www.thenxtstep.blogspot.com/


ď‚— http://www.nxtasy.org/
Hope You Have Fun!
   Good Luck!

Weitere ähnliche Inhalte

Andere mochten auch

Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5Motaz Saad
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1Motaz Saad
 
152167930 komponen-asas-robot
152167930 komponen-asas-robot152167930 komponen-asas-robot
152167930 komponen-asas-robotanip zahelan
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language BasicsEducation Front
 

Andere mochten auch (6)

Assembly Language Lecture 5
Assembly Language Lecture 5Assembly Language Lecture 5
Assembly Language Lecture 5
 
Random forest
Random forestRandom forest
Random forest
 
Assembly Language Lecture 1
Assembly Language Lecture 1Assembly Language Lecture 1
Assembly Language Lecture 1
 
What is CAD-CAM
What is CAD-CAMWhat is CAD-CAM
What is CAD-CAM
 
152167930 komponen-asas-robot
152167930 komponen-asas-robot152167930 komponen-asas-robot
152167930 komponen-asas-robot
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 

Ă„hnlich wie Lego Robotics(Programming)

RobotStudiopp.ppt
RobotStudiopp.pptRobotStudiopp.ppt
RobotStudiopp.pptNhaTruongThanh
 
ie450RobotStudio.ppt
ie450RobotStudio.pptie450RobotStudio.ppt
ie450RobotStudio.pptNhaTruongThanh
 
Robotics Slideshare Resource
Robotics Slideshare ResourceRobotics Slideshare Resource
Robotics Slideshare Resources0133116
 
Lego Robotics Presentation JG
Lego Robotics Presentation JGLego Robotics Presentation JG
Lego Robotics Presentation JGjmyearout
 
Sp robotics course_slides
Sp robotics course_slidesSp robotics course_slides
Sp robotics course_slidesMalaka GL
 
Sp robotics course_slides
Sp robotics course_slidesSp robotics course_slides
Sp robotics course_slidespoornimavvce
 
Top three robot programming methods (teaching)
Top three robot programming methods (teaching)Top three robot programming methods (teaching)
Top three robot programming methods (teaching)Tumul Ozha
 
Module6rob prog mr302_mtr_ncerc
Module6rob prog mr302_mtr_ncercModule6rob prog mr302_mtr_ncerc
Module6rob prog mr302_mtr_ncercJishnu Jish
 
SP_Robotics_Course_Slides.ppt
SP_Robotics_Course_Slides.pptSP_Robotics_Course_Slides.ppt
SP_Robotics_Course_Slides.pptgovind334539
 
Creating a logo program
Creating a logo programCreating a logo program
Creating a logo programayaabdullahs
 
Getting Started with Robotics
Getting Started with RoboticsGetting Started with Robotics
Getting Started with Roboticss0133116
 
FYPLIEWXUN
FYPLIEWXUNFYPLIEWXUN
FYPLIEWXUNLiew Xun
 
Lego For Extended Scrum Simulation
Lego For Extended Scrum SimulationLego For Extended Scrum Simulation
Lego For Extended Scrum SimulationAlexey Krivitsky
 
Me 405 final report
Me 405 final reportMe 405 final report
Me 405 final reportDarya Darvish
 
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)Una Tao
 
robotic arm
robotic arm robotic arm
robotic arm kanishk mahi
 

Ă„hnlich wie Lego Robotics(Programming) (20)

RobotStudiopp.ppt
RobotStudiopp.pptRobotStudiopp.ppt
RobotStudiopp.ppt
 
ie450RobotStudio.ppt
ie450RobotStudio.pptie450RobotStudio.ppt
ie450RobotStudio.ppt
 
Robotics Slideshare Resource
Robotics Slideshare ResourceRobotics Slideshare Resource
Robotics Slideshare Resource
 
Lego Robotics Presentation JG
Lego Robotics Presentation JGLego Robotics Presentation JG
Lego Robotics Presentation JG
 
Sp robotics course_slides
Sp robotics course_slidesSp robotics course_slides
Sp robotics course_slides
 
Sp robotics course_slides
Sp robotics course_slidesSp robotics course_slides
Sp robotics course_slides
 
Robasics
RobasicsRobasics
Robasics
 
Top three robot programming methods (teaching)
Top three robot programming methods (teaching)Top three robot programming methods (teaching)
Top three robot programming methods (teaching)
 
Module6rob prog mr302_mtr_ncerc
Module6rob prog mr302_mtr_ncercModule6rob prog mr302_mtr_ncerc
Module6rob prog mr302_mtr_ncerc
 
SP_Robotics_Course_Slides.ppt
SP_Robotics_Course_Slides.pptSP_Robotics_Course_Slides.ppt
SP_Robotics_Course_Slides.ppt
 
Final Project
Final ProjectFinal Project
Final Project
 
MESAPoster
MESAPosterMESAPoster
MESAPoster
 
Creating a logo program
Creating a logo programCreating a logo program
Creating a logo program
 
Getting Started with Robotics
Getting Started with RoboticsGetting Started with Robotics
Getting Started with Robotics
 
FYPLIEWXUN
FYPLIEWXUNFYPLIEWXUN
FYPLIEWXUN
 
Lego For Extended Scrum Simulation
Lego For Extended Scrum SimulationLego For Extended Scrum Simulation
Lego For Extended Scrum Simulation
 
Me 405 final report
Me 405 final reportMe 405 final report
Me 405 final report
 
Ev3 student worksheets
Ev3 student worksheetsEv3 student worksheets
Ev3 student worksheets
 
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
How to Rock with Robots for Young Makers with mBlock? (Teaching Material)
 
robotic arm
robotic arm robotic arm
robotic arm
 

KĂĽrzlich hochgeladen

08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking Men08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking Men08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking Men08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking MenDelhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣anilsa9823
 
9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In GhazipurGenuineGirls
 
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxUEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxEuro Cup 2024 Tickets
 
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls AgencyHire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls AgencyNitya salvi
 
( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptx( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptxParshotamGupta1
 
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...World Wide Tickets And Hospitality
 
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
Top Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash PaymentTop Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Paymentanilsa9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...World Wide Tickets And Hospitality
 
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxWorld Wide Tickets And Hospitality
 
08448380779 Call Girls In IIT Women Seeking Men
08448380779 Call Girls In IIT Women Seeking Men08448380779 Call Girls In IIT Women Seeking Men
08448380779 Call Girls In IIT Women Seeking MenDelhi Call girls
 
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Marina Costa
 
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docxAlbania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docxWorld Wide Tickets And Hospitality
 
ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024Brian Slack
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺anilsa9823
 
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...baharayali
 

KĂĽrzlich hochgeladen (20)

08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking Men08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking Men
 
08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking Men08448380779 Call Girls In International Airport Women Seeking Men
08448380779 Call Girls In International Airport Women Seeking Men
 
08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking Men08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking Men
 
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service  🧣
CALL ON ➥8923113531 🔝Call Girls Telibagh Lucknow best Night Fun service 🧣
 
9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur
 
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxUEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
 
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls AgencyHire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
 
( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptx( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptx
 
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
 
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
Top Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash PaymentTop Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
 
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
 
08448380779 Call Girls In IIT Women Seeking Men
08448380779 Call Girls In IIT Women Seeking Men08448380779 Call Girls In IIT Women Seeking Men
08448380779 Call Girls In IIT Women Seeking Men
 
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
 
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docxAlbania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
Albania Vs Spain Albania is Loaded with Defensive Talent on their Roster.docx
 
ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service  🦺
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best Female service 🦺
 
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
Asli Kala jadu, Black magic specialist in Pakistan Or Kala jadu expert in Egy...
 

Lego Robotics(Programming)

  • 1. Robotics: Lego Mindstorm NXT Stage 2: Programming
  • 2. Time to Program! You just built your starting robot! Congrats, now it’s ready for action. Oh wait, it’s just sitting there isn’t it… That’s because you didn’t give it a program yet, therefore, it doesn’t know what to do yet! So let’s learn how to program!
  • 3. Change How You Think Remember when I told you the most important thing you have to do it change how you think? Well now is when you learn why. To program, you have to understand how to think like a computer. And that’s to be able to think with algorithms, which is the computers thought process. You take for granted how easy it comes for people to be able to think and then act off that impulse, so we’re going to make you do an exercise to learn how to think like a programmed robot.
  • 4. Stop and get programmed We are going to put you in groups of two. One volunteer to be the robot, the other is the programmer. Now blindfold the volunteered robot, arrange an obstacle course in our room, and the programmer verbally direct the “robot” through it. (i.e.“Take 3 steps, stop, turn left 90 degrees, stop, take 4 steps, stop, etc.”) And the robot can’t feel around, keep arms to the side.
  • 5. What did you learn? You probably noticed that it was harder to get around when you couldn’t think for yourself as the robot. And if you were the programmer, you must have had to think pretty detailed on what directions to give and how. That’s the point. Robots can’t think for themselves, they need exact directions. When you program your robot you are going to need to know where you want it to go, how far, what direction, when to turn, when to stop, etc.
  • 6. Programming with NXT Now that your mindset is in programmer mode, let’s Mindstorm! (corny pun) Lucky for you, NXT programming is not that complicated.
  • 7. Basics The goal of this week is for you to learn how to program on your own and be as creative with it as you want. So we aren’t going to give a strict guideline on how to program your robots, the goal is to learn the basics and program your robot anyway you see best! Once you start learning the basics you might discover better ways to program than the other teams or the instructors, don’t hesitate to be creative.
  • 8. Movement You make NXT programs like you are putting Lego blocks together. Movement blocks are one of the most used actions in programming. You can decide what servo to activate with them, direction, and for what duration. (Duration will be important later)
  • 9. Sound Blocks When you activate these blocks you can make your robot play a sound from the files in the NXT programer
  • 10. Switch When you need to program a function for a sensor, you use the switch function. It allows you to program exactly what the robot should do if a sensor is tripped. Example: Touch sensor trips, program to move back 2 rotations, then turn right, continue to next function.
  • 11. Wait button The wait function is necessary for when you want your robot to act until it trips a sensor. So if you want the robot to act a certain way when it trips a certain sensor, you will use the wait botton.
  • 12. Loopty Loop Loops are very handy, they contain a program you want to repeat. It can repeat once until forever if you like.
  • 13. Stop: It has to at some point! The most important thing you need to learn in programming is how to stop! We don’t get paid enough to do this forever! You will want to program your robot to stop at some point. Remember that you can program the stop function into a loop or sensor action.
  • 14. Making the Distance Remember the movement blocks? When you want to program your robot to go a certain distance, how do you know how long to make it run? Well, you don’t. The fact that any robot you make can move different than other robots means that you have to find out how far it will go on your own. We have a handout ready to help you write down your data.
  • 15. The reason we suggest using “rotations” instead of “seconds” to run the movement blocks is because it is easier to figure out how many rotations it takes to go a certain distance. Basic math will figure out longer distances. ď‚— Le sg totheP g m ingHa o t’ o ro ra m nd ut
  • 16. Stage 3 Now that you have collected your data on (Obstacle2) distance, you can (Obstacle3) (Obstacle1) accurately program your robotic system around our obstacle course. The course floor plan will vary depending on what location you are in, but it Start will look something like Finish this.
  • 17. Competition We will have a friendly competition to see what team has programmed their robot with more skill. The team that completes our course with the best time wins. However, when the competition is complete, you can readily get back into teams and begin to create more robotic creations. The point of all three stages was to teach you how to create and program NXT robots, so be creative and have fun!
  • 18. Additional Designs There are some additional designs in the Lego NXT program, but if you want to find designs off the internet go to the following sites: ď‚— www.nxtprograms.com ď‚— http://www.thenxtstep.blogspot.com/ ď‚— http://www.nxtasy.org/
  • 19. Hope You Have Fun! Good Luck!