Imagineit workshop



Download 26.17 Kb.
Date29.01.2017
Size26.17 Kb.
#12138

ImagineIT Workshop,

part of Project ACE (Accessible Computing Education)




Lego Mindstorms NXT (BricxCC, NXC) Lesson Plan

This lesson has been tested with students with visual impairments in grades 7 – 12


This work is funded as part of the National Science Foundation,



Broadening Participation in Computing Program (Award #0634319)

Principal Investigator: Dr. Stephanie Ludi, sal@rit.edu

BPC- LEGO Mindstorms: Navigation and Detection



Objective: To provide students the opportunity to design and program a robot to solve a given problem, in a team setting. The robot is built by the student teams, providing a teamwork activity. In terms of design and programming key concepts explored are designing and testing of both the robot and the program and programming constructs (including loops, if-then, variables, logic).

Materials:

  • Each team receives a LEGO Mindstorms NXT set, with the beginner robot constructed with the touch sensor (as described in the kits instruction book)

  • Each team needs a computer with USB, JAWS (or similar software), and BricksCC installed

  • 1 maze, see Appendix A

  • Stopwatch, notepad and pencil to keep track of time it takes for each robot to finish the maze


Activity Environment: classroom for intro, team rooms (or large computer lab) for work, atrium for robot trial

Before Activity (Instructor): Build the robot and ensure the LEGO Mindstorms BricksCC programming environment is installed on the team room machines. Have sample code loaded on each computer. Print activity handouts in large print (and Braille as needed).



Note: Parents and student volunteers can help in the construction, but the ImagineIT students must lead the activities.
DAY 1

  1. Divide students into teams of 3 people and distribute handouts; each team has a number that corresponds to the number on the kit and robot. Each team has a whiteboard.

  2. Introduction to Lego Mindstorms and NXT

    1. Familiarization with pre-built tri-bots

      1. Using the tri-bots as tactile examples, have each student examine the tri-bot and sensors to be used in the activity.

      2. Explain purpose of the:

        1. Brick, including the ports for motors and sensors and all buttons

        2. Sensors (touch, sound, ultrasound)

        3. Cables linking motors and sensors to the brick

    2. Running programs already on the brick

      1. Turning brick on and off

      2. Selecting file from menu

      3. Have students run sample program, where the robot moves forward then stops

  3. Introduction to BricksCC

    1. Basic BricksCC concepts

      1. What it is and what NXC is

      2. Starting the program and selecting the brick (USB port, NXC language, NXT brick)

    2. Type in a simple program, where the robot moves forward for four seconds and stops.

    3. Compile, download to NXT, Run

    4. Modify existing program (Load from file moveforward4.nxc), have the students change the time from 1 second to 4 seconds, then later append another move forward 2 seconds and then stop.

  4. Lesson 1: Movement, Touch and Audio

    1. Code is supplied for these activities (see handout), students will type in but will start with a basic program skeleton (with the imports, main).

    2. For each of the following, have the team enter the program, compile it, download it to the robot, and see the results. Have them observe the commands, how parameters affect the outcome, and how the robots work.

      1. Step 1: Move forward, turn around, play sound

      2. Step 2: Move forward until touch, turn right

      3. Step 3: Repeat three times: Move forward until touch, turn right

    3. The teams should use their work table to test their programs

  5. Lesson 2: Sensors and More

    1. Code is supplied for these activities (see handouts), students will type in but will start with a basic program skeleton (with the imports, main).

    2. For each of the following, have the team enter the program, compile it, download it to the robot, and see the results. Have them observe the commands, how parameters affect the outcome, and how the robots work.

    3. Step 1: Move forward towards sound, touch and stop

    4. Alternative Step 1: Robot moves when activated by sound then stops when hears a sound.

    5. Step 2: While there is sound, move forward, touch sound source– if running into a wall, turn left

    6. Step 3: Move forward toward wall, detect with ultra sound within range of ??, then turn left and play sound, repeat three times. (this one needs some work)

  6. Design Challenge Introduced

    1. Introduction

      1. The Challenge: The robot needs to be able to navigate through a maze and locate a sound source, like a search and rescue robot. After the maze is exited and the sound source located, the robot needs to indicate this by playing a sound.

      2. Show the students the maze and play the sound source at the end of the maze, which is on a table that is accessible to the teams for testing

      3. Explain that solving such a problem, like developing software is done in small increments, which allow for controlled progression and chances for feedback. Students will be told that they need to develop their project in 2 increments as follows:

    2. Increment 1 - Navigate Through the Maze using the Touch Sensor

    3. Increment 2 - Navigate Through the Maze to Locate the Sound Source and Play Sound

    4. Naming

      1. Have each team pick a team name and pick a robot name

    5. Roles (Have a student select which roles he/she wants)

      1. Recorder: records the decisions made on such things as the design, algorithms, etc. (can be shared if 3 people on team)

      2. Project Lead: Leads the discussion and makes sure that all have the opportunity to contribute to discussions, checks on how others are doing and coordinates efforts

      3. Development Lead: Leads with the use of the BricksCC and making sure what was designed is implemented

      4. Quality Lead: Checks that the design, and program meet the requirements

  7. Design for Increment 1: Navigate through the maze using the touch sensor

    1. Allow students (within their teams) to discuss their approach to their solution and draft it using the foam pieces. Remind them to break the increment into smaller problems, walkthrough their solution and discuss any potential issues that may crop up that could cause problems. Walk around and gauge their approaches, offer some suggestions if it looks like they are WAY off or need some help getting started, etc. Stress the importance of designing the solution before diving into coding.

    2. Have each team discuss how their robot should traverse the maze, while meeting the problem requirements.

    3. Give each team time to plan the algorithms needed to navigate the maze. The team recorder needs to document the order of the steps of the program.

    4. Have the team conduct a walkthrough of the program and revise it as needed.


DAY 2

  1. Develop for Increment 1

    1. Repeat until done

      1. Have each team program a small part of the program (or fix a part, as needed)

      2. Have the team download the program for that part and test it

      3. If defects are found, what are they and what may need to be changed in the code or design

    2. While the teams are working, see how they are doing and offer assistance as needed in the implementation details, problem solving, teaming, etc.

  2. Design for Increment 2: Navigate through maze to locate sound source and play sound

    1. Allow students (within their teams) to discuss their approach to their solution and draft it using the foam pieces. Remind them to break the increment into smaller problems, walkthrough their solution and discuss any potential issues that may crop up that could cause problems. Walk around and gauge their approaches, offer some suggestions if it looks like they are WAY off or need some help getting started, etc. Stress the importance of designing the solution before diving into coding.

    2. Have each team discuss how their robot should locate the sound source while accounting for the maze traversal, while meeting the problem requirements (e.g. also playing the sound). They can just use one of the preloaded sounds on the brick.

    3. Give each team time to plan the algorithms needed to navigate the maze. The team recorder needs to document the order of the steps of the program.

    4. Have the team conduct a walkthrough of the program and revise it as needed.

  3. Develop for Increment 2

    1. Repeat until done

      1. Have each team program a small part of the program (or fix a part, as needed)

      2. Have the team download the program for that part and test it

      3. If defects are found, what are they and what may need to be changed in the code or design

    2. While the teams are working, see how they are doing and offer assistance as needed in the implementation details, problem solving, teaming, etc.

  4. Final Testing

    1. Use test area to fine tune implementation

  5. Delivery

    1. Each team individually runs their robot through the maze

    2. All teams are present for the final delivery of robots. Each team presents their robot and places it on the entrance point. The robot is started and end time is recorded. If the robot does not complete the maze, record how far it traversed the maze. If the robot does not find the sound source or play the sound afterwards, give partial credit.

    3. Each team is acknowledged and celebrated regardless of maze completion.

    4. Discuss with students and parents what they learned about working together, design, and programming.

    5. Remind all of the relevance of these skills to computing careers.

Appendix A:

The maze is square and made of wood that is meant to be placed on a table. The base is 48 x 48 inches, with the walls being 9-10 inches high and about an inch thick.

The path is: down along the left side, turn right, move a bit forward, turn right, move down the corridor, turn left, move a bit forward, turn left, move down the corridor, and turn right and move forward to move out of the maze.



The sound source is a laptop with an attached speaker that can be placed in the desired location. The sound played is from a tone generator found online.

ImagineIT Workshop 2007


Download 26.17 Kb.

Share with your friends:




The database is protected by copyright ©vi.originaldll.com 2024
send message

    Main page