Module 2, Add on lesson Introduction to the NXT and Mindstorms software. Teacher. 45 minutes

Similar documents
Module 2, Add on lesson Introduction to the NXT and Mindstorms software. Student. 45 minutes

Renewable Energy. Getting Started With the LEGO Energy Meter

Robotics II. Module 5: Creating Custom Made Blocks (My Blocks)

the NXT-G programming environment

Recipes4Success. Draw and Animate a Rocket Ship. Frames 5 - Drawing Tools

Using Mapmaker s Toolkit. In this tutorial, you will learn the following basic elements of Mapmaker s Toolkit:

Part 1: Basics. Page Sorter:

MindTap Math Foundations Instructor s Guide to Communication Tools

Robotics II. Module 4: Bluetooth Communication

Get comfortable using computers

Collaboration Tools. Student Guide. Copyright 2015 by Edmentum. All Rights Reserved.

PHYC 500: Introduction to LabView. Exercise 1 (v 1.3) M.P. Hasselbeck, University of New Mexico

EV3 Programming Workshop for FLL Coaches

This page outlines some of the alternate pieces that can be used for building.

ROBOLAB Tutorial MAE 1170, Fall 2009

SolidWorks 2½D Parts

Robotics Study Material School Level 1 Semester 2

LME Software Block Quick Reference 1. Common Palette

Managing Your Grade Book This lesson will show you how to set up your grade book columns and have Canvas calculate your final grades for you.

FRC LabVIEW Sub vi Example

Use the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated.

ACTIVINSPIRE CHEATSHEET

What Is a Program? Pre-Quiz

Basic Classroom Tools Promethean Module 1 (ActivInspire)

Ancient Cell Phone Tracing an Object and Drawing with Layers

Tech Tips. BeeBots. WeDo

Edupen Pro User Manual

Controlling the Robotic Arm using the BBC micro:bit

SolidWorks Intro Part 1b

Robotics II. Module 3: Dealing with Files

LEGO MINDSTORMS NXT Lab 4

Tutorials. Lesson 3 Work with Text

Panther Instructions

A QUICK TOUR OF ADOBE ILLUSTRATOR CC (2018 RELEASE)

Part A: Monitoring the Rotational Sensors of the Motor

The Institute for the Future of the Book presents. Sophie. Help. 24 June 2008 Sophie 1.0.3; build 31

Recipes4Success. Animate Plant Growth. Share 4 - Animation

ENGL 323: Writing for New Media Repurposing Content for the Web Part Two

Excel Spreadsheets and Graphs

Word 2003: Flowcharts Learning guide

Robolab. Table of Contents. St. Mary s School, Panama. Robotics. Ch. 5: Robolab, by: Ernesto E. Angulo J.

HYPERSTUDIO TOOLS. THE GRAPHIC TOOL Use this tool to select graphics to edit. SPRAY PAINT CAN Scatter lots of tiny dots with this tool.

Quick Keyboard Short Cuts. Instructor: Rachel Miller

Robot Navigation Worksheet 1: Obstacle Navigation

2 Lab 2: LabVIEW and Control System Building Blocks

4. Click Manage Program for the device you wish to edit. This will take you to the program playlist for that device.

Step-by-Step Data Acquisition Part II Exercise 2: Generating an Analog Output Waveform

Learning to use the drawing tools

Vision Pointer Tools

COMP2611: Computer Organization Introduction to Logisim & simple combinational circuit

Pre-Lab Excel Problem

University of Florida EEL 3701 Dr. Eric M. Schwartz Madison Emas, TA Department of Electrical & Computer Engineering Revision 1 5-Jun-17

A Guide to Autodesk Maya 2015

EE261 Computer Project 1: Using Mentor Graphics for Digital Simulation

Promethean ActivInspire Module 6 "Heightening Student Engagement" ActivSlate

2. Getting Started When you start GeoGebra, you will see a version of the following window. 1

FACULTY AND STAFF COMPUTER FOOTHILL-DE ANZA. Office Graphics

Emote 1.0 Users Manual

DEPARTMENT OF EDUCATION. Schedules

Migration Guide. Notebook to ActivInspire

Computer Essentials Session 1 Step-by-Step Guide

Moodle 3.1 Backup and Restore

Instructions for Installing FlashUpdate and Downloading Updates for Super Buddy Satellite Meter

Google Sheets: Spreadsheet basics

Introduction to PowerPoint 2007

Classroom Blogging. Training wiki:

NXT Programming for Beginners Project 9: Automatic Sensor Calibration

How to - Record Your Own Sound Effects & Voice - Play them on the NXT Brick Within a Program

Introduction In this document, users will Llearn how to utilize SysQue Systems Pipe, and how to draw Pipe into their projects.

Robotics II. Module 2: Application of Data Programming Blocks

User Guide. Dynamic Student Edition and Dynamic Student Edition ebook App

Convert VHS to Digital or DVD using Roxio Video Capture

Maple Quick Start. Maplesoft, a division of Waterloo Maple Inc.

Touring the Mac. S e s s i o n 3 : U S E A N APPLICATION

Full Search Map Tab. This map is the result of selecting the Map tab within Full Search.

Google Docs: Spreadsheet basics

Your First Windows Form

To start Kidspiration on a Macintosh: Open the Kidspiration 3 folder and double-click the Kidspiration icon.

Using Microsoft Journal

After completing this lesson, you will be able to:

ADD AND NAME WORKSHEETS

This course will introduce the user to a Mobi and the Workspace software. This tool allows the instructor to annotate and work alongside of the

Mobi View. Charging: Turning on Mobi View: Using Your Mobi View: Writing Notes:

This is a demonstration of how you can create a Microsoft Power Point presentation:

Creating Postcards in Microsoft Publisher

An Animated Scene. Pick a color for the street. Then use the Paint can to fill the lower part of the page with grass.

Week 5 Creating a Calendar. About Tables. Making a Calendar From a Table Template. Week 5 Word 2010

InDesign Tools Overview

Contents. Foreword. Examples of GeoGebra Applet Construction 1 A Straight Line Graph... 1 A Quadratic Graph... 6 The Scalar Product...

Robotics II. Module 1: Introduction to Data & Advanced Programming Blocks

if you have anything on the screen you can clear it by pressing: CLEAR

Guide to Completing Your Senior English and Government Portfolios

Kodiak Quick Guide: Content

How To Create and Post a Video in a Discussion

Create a Seating Chart Layout in PowerTeacher

Basic Data Acquisition with LabVIEW

Making a maze with Scratch

LESSON 8 COPYING SELECTIONS

Use Parametric notation. Interpret the effect that T has on the graph as motion.

TI-Nspire Technology Version 2.1

Transcription:

Module 2, Add on lesson Introduction to the NXT and Mindstorms software Teacher 45 minutes Purpose of this lesson Write a basic program using LEGO Mindstorms Download and run programs on the NXT Materials Copy of the lesson Computer Mindstorms software Introduction to the NXT and Mindstorms software 1

Background and discussion Open LEGO Mindstorms (File -> New), and the following screen will appear: MAIN PROGRAMMING WINDOW Sequencing Beam Block Palette Program Starting Point NXT Controls Palette Selector Help Tab Map Tab CONFIGURATION PANEL HELP / MAP WINDOW Block Palette: Access the blocks for use in Mindstorms programs. Palette Selector: This selects which functions are available on the block palette. Program Starting Point: The program will start from this point. Sequencing Beam: This beam connects the blocks in the program. The blocks connect one after another in order along the sequencing beam. Help Tab: Shows the help window. When you click on a block in the program, the help window will show helpful information about how to use that block. Map Tab: Displays a map of the program in the map window. If you click on a spot on the map window, the main programming window will center on that point. NXT Controls: These are used to download programs to the NXT and run them. Introduction to the NXT and Mindstorms software 2

Displaying Text on the NXT Screen with a Mindstorms Program 1) Follow the directions below to display the equation of 3 * 4 = on the NXT screen. a. To display something on the NXT screen, use a display block. On the palette selector, choose complete palette (middle tab). Then, on the palette, scroll over the common icon (the green circle), and the select the display block (the computer screen), as shown below: b. Move the display block into the blue start area, and click to connect it to the program starting point. c. Click on the display block to activate the configuration panel at the bottom. In the configuration panel, use to pull down menu to change the Action from Image to Text. Then change the Text from Mindstorms NXT to 3 x 4 = by typing over it. d. Now your screen should look like this: Introduction to the NXT and Mindstorms software 3

e. To keep the display on the NXT screen, add a loop block after the display block. Scroll over the common icon in the palette window again, but this time select the loop block. Move the loop block behind the display block until you see the sequencing beam extend, then click to put the loop block in place. Programming Tip: If a block in your program is grayed out, that means that it has not been connected to the sequencing beam, and will be ignored when the program runs. You can click and drag a block to move it within the programming window, and if you move it close enough to the sequencing beam that the beam extends, then when you click it into place it will be attached to the sequencing beam. The loop above is not connected to the beam The two blocks are connected properly. f. Place a charged battery in the NXT. Connect the USB cable to the NXT and the computer. Turn on the NXT by pressing the orange button. g. Download your program to the NXT by clicking the arrow button in the middle of the NXT control panel on the bottom right of the Mindstorms main programming window. NXT TIP: If you get a message that says the firmware on the NXT is out of date, that means you need to download new firmware before your programs will run. Firmware is computer code that is stored on the NXT and is separate from your Mindstorms programs. To update the firmware using the Mindstorms software, go to the tools menu at the top of the screen and select Update NXT Firmware. When the window comes up, select download. Wait until the download is finished, then close the window and try running your program again. h. At this point, your NXT should display 3 x 4 = on its screen. i. The loop program is set to inifinity, meaning it will run forever, so the program won t stop on its own. Stop the program by either clicking the stop button in the NXT controls in Mindstorms, or by clicking the dark grey button on the NXT. j. Save your program to the computer. NXT Tip: The dark grey button on the NXT is the back button. It takes you to previous menus. If you go all the way back, it gives you the option of turning off the NXT. The orange button is the enter button. Introduction to the NXT and Mindstorms software 4

Assessment 1 1. Click the display block, change the values of X and Y in the configuration panel, and run your program. What happens to the display as you change X and Y? Answer: The message moves to a different place on the screen. 2. Set your loop to run for a certain amount of time. In your program, click on the loop. In the configuration panel, under Control, switch from Forever to Time. Now enter some number of seconds and run your program. What happens? Answer: The program should run for however many seconds the student entered, and then stop on its own. 3. Delete the loop from your program and run it. Now what happens? Why? Answer: Now the program stops right after it starts, and there s not even any time to read anything on the display. The reason is that without using anything to pause the program, it immediately stops as soon as it finishes doing the display. 4. What is the difference between the following two programs? Do you expect them to run any differently on the NXT? Why or why not? Answer: The two programs should appear to run the same on the NXT. The difference between them is that in the first case, the program will update the display once, and then just wait forever until the program is stopped. In the second case, the program will continue to update the display over and over again, because the display block is inside the loop. But, since the display block is set to always display the same message, the display will not change over time, so the two programs will appear to be identical when they are run. Introduction to the NXT and Mindstorms software 5

Programming Tip: You can put blocks inside of a loop. When you move a block to a position inside a loop, the loop will automatically expand in size to accept the new block. Making a calculation and displaying the result with a Mindstorms program 1. Add a math block to the program (the math block is under data blocks on the block palette) before the other two blocks, so the program looks like this: 2. Notice the input/output bar sticking out from the math block. Inputs and outputs are used to pass data from one block to another. Inputs have a connector on the left, and outputs have a connector on the right. (Note: some items can be both an input and an output). 3. Click on the math block. In the configuration panel, set the operation to be multiplication. Also set A to the value of 3, and set B to the value of 4. This tells the block to multiply 3 x 4. 4. From the advanced blocks on the block palette, select the number to text block and insert it after the math block. Your program should now look like this: Programming Tip: Most programming languages, including Mindstorms, treat text differently than numbers. Numbers are used for calculations, and text is used for displays. In order to display a number, it must first be converted to text. 5. Wire the # output of the math block to the # input of the number to text block. Your program should now look like this: Introduction to the NXT and Mindstorms software 6

Programming Tip: To run a wire, first click on the output you wish to wire (the cursor should change to a wire spool before you click), then drag the wire where you would like it to go. If you click in a blank spot while dragging a wire, the wire will be pinned in that spot this helps you keep your drawings of wire looking orderly. Click on the input you wish to connect in order to finish the wire. You can erase a partially drawn wire by hitting escape if you haven t yet connected it to an input. To remove a wire that has been wired to an input, click on the wire at the input. 6. Add another display block just to the right of the number to text block. In the configuration panel for the new display block, change the Action from Image to Text and change the Line from 4 to 5. 7. Click on the line at the bottom of the new display block to open up its input/output bar. Programming Tip: Clicking on the line at the bottom of a block will open its full input/output bar. Clicking at the top of an open input/output bar will hide all of the inputs and outputs except for those which have been wired. 8. Wire the text output of the number to text block to the text input of the new display block. Hide the unused inputs and outputs. Your program should now look like this: 9. Click on the original (rightmost) display block. In the configuration panel, uncheck the box where it says clear. 10. Save and run your program. The NXT display should read: 3 x 4 = 12 Introduction to the NXT and Mindstorms software 7

Assessment 2 1. What programming change is needed to make the NXT show the whole equation on one line instead of two lines (so it reads: 3 x 4 = 12)? Answer: You could change the X and Y values in the first display block to change the position where the answer (12) appears on the screen. 2. Go back and check the clear button of the second display block (that you unchecked in step 9 above), then run the program. What happens? Why? Answer: Now the screen only displays 3 x 4 =, and it doesn t display the answer. The reason is that with the clear button checked, the second display block clears the screen before displaying its text, so the answer (12) from the first display block gets erased. 3. Use your program to calculate 10,864 x 26,532. Record the answer here: Answer: 288,243,648. To get the answer, change A and B in the math block to 10864 and 26532, respectively, and run the program. 4. Delete the two wires in your program, and try to wire the # output of the math block directly to the Text input of the display block. What happens? Why? Answer: The wire appears as a broken wire (shown as a dotted line). This is because the NXT won t treat a number (a numeric value) as text. This is why the number to text block is needed. If you try to run a program containing a broken wire, you ll get an error. Introduction to the NXT and Mindstorms software 8