Basic Programming

ACTIVITY HEADER

Name of Activity Basic Programming
Author Ali Boreiko
Keywords touch sensor, ultrasonic sensor, sound sensor, light sensor, simple programming, introduction to NXT, introduction to Mindstorms, introduction to programming
Subject NXTs
Grade Level 4, 5, 6, 7, 8
Time 1 Hour Total
Brief Description Students complete a simple series of programming challenges to familiarize themselves with Mindstorms programming.
Lesson Objectives: For students to become more competent programmers
Materials Needed: computers with Mindstorms, whiteboard/chalkboard, a list of simple challenges OPTIONAL: pre-built cars
Preparation and Set Up: 1. Decide what functions of the NXT will be most useful for your class. Do you want them to know how do use a particular sensor? How to steer the robot? How to make the NXT make noises? Then, create a list of ~8 challenges that target these areas of Mindstorm programming (see our example under “References”). Create the challenges so that harder challenges only require the students to change 1 or 2 parts of their program. That way they will see the direct connection between the change they made and the robot’s actions. They will also feel accomplished if they are able to complete more challenges.

2. You may have the students pre-build a car, but the activity can also be done by programming other things (e.g. an NXT arm)

Procedure
  1. Ask each group to put the necessary sensor/equipment onto their robot.
  2. As a class, program the first challenge. As kids complete the challenge, have them come up to the board and demonstrate the challenge to either STOMPer. Once the students have accomplished and demonstrated the challenge, write their name on the board next to the challenge.
  3. Once kids have finished the first challenge, they may go on to harder challenges–but they must complete them in order!
  4. As kids complete the challenges, check off the challenges under their names. This way, you recognize kids who stay focused on the tasks.
Extensions: This activity can be adapted for various skill levels by simply making the challenges more difficult or adding more difficult ones at the end of the list
Previous Activity (if applicable) Introductory building
References Our list of touch sensor challenges
Umbrella Unit/Curriculum (if applicable) Introduciton to Mindstorms, Introduction to NXT Robotics

Pet Training Activity

ACTIVITY HEADER

Name of Activity NXT Pet Training Activity – (Intro to Touch Sensor)
Author Leticia’s Group
Keywords NXT, animal, touch sensor
Subject NXTs
Grade Level 6
Time 4+ Hours Total
Brief Description This activity is designed for 6th graders to practice “training their animal robot” by using the touch sensor. Students brainstorm tricks for animal NXT robots. The level of difficulty can vary based on their familiarity with the touch sensor and estimated to last two weeks.
Lesson Objectives: Introduce students to the touch sensor by asking them to explore its properties through different ways of training your pet dog. It would require them to go through the design process and think through the ways we train our pets and how those commands can be translated and applied to the NXT animal robotics. Important for them to think about what sort of commands they are capable of programming that would work well on the robot.
Materials Needed: LEGO NXTS
Procedure The point of this activity is to train your pet dog using touch sensors. Some of the activities could be to see what happens or how the animal robot reacts when you pet its head or tail. One of the students tasks or goals should be to be able to program their robot so that when the touch sensor is pressed once it does a command and then pressing twice it does a different command. Possible solutions for them could be to get their robots to lift and shake a hand, twirl around, potentially use their sound sensor to bark, or wag their tail.

Speed Fans

ACTIVITY HEADER

 

 

 

Name of Activity Speed Fans
Author STOMP
Keywords fan, LEGO, speed, touch sensor, programming, 1 Hour Total, 4-6
Subject NXTs
Grade Level 4, 5, 6
Time 1 Hour Total
Brief Description The activity involves building a fan out of LEGOs and creating a MINDSTORMS program that will change the speed of the fan every time the touch sensor is pressed.
Lesson Objectives: Gain basic understanding of programming with MINDSTORMS.
Materials Needed: NXT Kits/ RCX Kits.

Computers with MINDSTORMS or ROBOLAB installed.

Necessary Background Knowledge of programming with MINDSTORMS.

Vocabulary:

Touch sensor

Power Levels

Procedure 1) Explain the basics of programming. 2) Distribute the kits and explain the task ( i.e. to build a fan that changes speed when the touch sensor is pressed) 3) Have the students build a fan out of LEGOs in their kits. 4) Let the students try to figure out how to program the fan on their own. If they need help explain to them how the power level of the motor can be changed every time the touch sensor is pressed thus changing the speed of the fan.
Extensions: Program the fan using loops.
Use the activity to talk about air flow.

Maze Competition

ACTIVITY HEADER

 

 

 

Name of Activity Maze Competition
Author STOMP
Keywords NXT, car, touch sensor, maze, switch blocks, decision statement
Subject NXTs
Grade Level 4, 5, 6
Time 1 Hour Total
Brief Description Students will construct an NXT car and program the car to be controlled by two touch sensors. Students will drive their car through a maze.
Lesson Objectives: - To learn to program with touch sensors and use decision statements “Switch Blocks”.
Materials Needed: NXT car or materials to build an NXT car
Two touch sensors and long wires per car
Assortment of extra LEGO pieces
Tapeline Maze
Planning Sheet and Final Design Sheet (attached or make your own)
Computer running MINDSTORMS NXT-G Software
Preparation and Set Up: Construct one or more maze(s) for students to use for their NXT cars.
Photocopy worksheets.
Arrange student into groups of two.
Distribute necessary materials.
Necessary Background Vocabulary:
- Switch block.
- Decision statement.
Procedure
  1. Have students plan out their design and program. Ask students questions to help them plan: How will students make their car so it turns easily? What makes a car turn in a computer program? What response should the car have when one touch sensor is pressed? What response should the car have when both sensors are pressed?
  2. Give students pre-built models or have students build a two-motor car using and NXT brick and two NXT motors.
  3. Have students wire two different touch sensors to the car using long wires. The sensors should not be directly attached to the car because the students will hold the sensors to direct the car.
  4. Have students program their two-motor cars:
    1. Students should recognize that they have two touch sensors attached to two ports.
    2. Both touch sensors need to be able to work at the same time so two paths should be created.
    3. You want two responses from the touch sensors. You can get these two responses from a decision statement, or “switch” block (if pressed then response 1. If released then response 2).
    4. The Switch blocks will need to be contained within a loop or else the NXT brick will only look for a response once and the program will end instantaneously.
  5. Allow students to test their designs in the maze you have set up.
  6. Remind students that they may redesign their cars and programs if they do not complete the maze.
  7. Optional: have a prize at the end of the maze.
Extensions or Modifications: - Create a maze that has a different challenge that will require further design
changes in the car or program (ramp, narrow section, line that students must
stop on).
- Use light sensors to navigate a maze (similar to line following activity).
- Use the proximity sensor to navigate through a maze made out of cardboard boxes.

Modifications:
- Use only one sensor to make car drive forward and stop.

Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/59_image_2_paj.png
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/59_image_3.png
Reference 3 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Building_Design_Sheet2.pdf
Reference 4 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Engineering_Design_Process1.doc
Reference 5 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Final_Design_Sheet2.pdf
Reference 6 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Maze-Competition.pdf
Reference 7 http://sites.tufts.edu/stompactivitydatabase/files/formidable/Maze_competition.doc

Switch to our mobile site