Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007.

Similar presentations


Presentation on theme: "Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007."— Presentation transcript:

1 Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007

2 Topics Differences between Common, Complete and Custom Palettes Opening and Saving Programs Tools Menu Download Menu NXT Window Basic Programming with the Common Palette Icons Troubleshooting: Downloading and Updating Firmware Using the Feedback Block

3 Common Palette MoveRecord/PlaySoundDisplay Wait for (sensors) LoopSwitch

4 Common Palette There are 20 challenges under the Common Palette There are 20 challenges under the Common Palette Each challenge has a video of what should happen, a design guide, and a build guide. Each challenge has a video of what should happen, a design guide, and a build guide. It’s a fun way to learn about building and programming NXTs

5 Complete Palette Links to Common Palette icons ActionsSensorsFlowDataAdvanced

6 Custom Palette My Blocks - You can store reusable blocks of programming that you created here Web Downloads - You can save programs friends email you or programs you get from sites like www.mindstormseducation.com

7 Opening Programs For a NEW program 1. Click on File/New on the Menu Bar or 2. Type a name for your program under Start New Program and click Go 2. Type a name for your program under Start New Program and click Go For a SAVED program 1. Click on File/Open or 2. Click on the drop down arrow in the box under Open Recent Program, pick your program, and click Go Open saved file Open new file

8 Saving Programs If you have already named your program, you can click File on the Menu Bar then click Save. If you have not named your program, change the name from Untitled to something that indicates what your program does. Avoid long names and random punctuation symbols in your filenames Look to see where your files are being saved so it will be easy for you to find them again!

9 Tools Menu Calibrate Sensors One way to calibrate your light and sound sensors. Details on last slide of PowerPoint. There is an easier way to calibrate light sensor.

10 Update Firmware Connect and turn on NXT. Connect and turn on NXT. If you’re online, click Check. If you’re online, click Check. Find the most recent update. Find the most recent update. Download. Download. Be sure to see where it downloads! Be sure to see where it downloads!

11 Block Import Export Click on Browse button to find and select the Block/file you want to import. Click on the dropdown arrow by Advanced to select where you want the block to be stored. Click on the Add Blocks to Palette button

12 Download to Multiple NXTs You can download one or more program files to multiple NXTs. You can download one or more program files to multiple NXTs. Detailed directions are at the end of this PowerPoint and available by clicking on the Mindstorms help icon on the Menu Bar

13 NXT Window Download and Run Download Download and Run selected Stop NXT Window

14 Wonderful NXT Window - Communications Tab Name your robot Check battery life remaining Check file storage available Check firmware version Check NXTs connected

15 NXT Window - Memory Tab Delete, upload or download files. To delete, select the group, like Sound, to see the Sound files on the NXT. Highlight the file you want to delete. Click Delete. You can delete all if you wish. NOTE: This deletes files from your NXT, not your computer.

16 Basic Programming with the Common Palette Move Wait Block - for motors Record/Play Wait Block - Sound Wait Block - Plays a sound Display Wait Block - Words, data, graphics Wait for Wait Block - Sensor icons Loop Wait Block - Repeat action until Switch Wait Block - If “True” do X, if “False” do Y

17 Basic Programming with the Common Palette Move Icon Used to control your motors Built in rotation sensor LCD display on NXT brick shows number of rotations as they are counted Inside the motor

18 Move Icon - Properties This move icon programming says that the motor is connected to Port C. Its Direction is forward at Power 60% for Duration 1.7 seconds (unlimited, rotations, degrees are other options for Duration) and then Brake. Rotation and degrees measure rotation of motor, not wheel

19 Basic Programming with the Common Palette Record/Play Icon Lets you record and save movements of your robot

20 Basic Programming with the Common Palette Sound Icon Recognized sound patterns and tones Recognized sound patterns and tones Can be programmed to respond to one clap, two claps or a musical note. Can be programmed to respond to one clap, two claps or a musical note. In what kind of environment would you NOT want to use this sensor? In what kind of environment would you NOT want to use this sensor?

21 Basic Programming with the Common Palette Display Icon Can be programmed to display images, text, or drawings. Below the display is programmed to show a Happy Face

22 Display You’ll want to add a Time block after the Display block so that the images stays displayed. Otherwise, it happens so fast you don’t see it. Sample code below.

23 Basic Programming with the Common Palette - Wait Icon Wait Icon - Sensors TimerTouchLightSoundUltrasonic

24 Touch Sensor Detect On (When pushed in so the electrical connection is made) or Detect On (When pushed in so the electrical connection is made) or Off (when not pressed and no connection is made) Opening for inserting an axle so you can extend the touch range and/or add height/width at the tip (Be careful about using these extensions if you are also using an ultrasonic sensor!)

25 Ultrasonic Sensor Measures distances from objects Sends out a signal, waits for return of signal, while keeping track of time between send and receive CUTE!

26 Ultrasonic - Icon and Properties Does best with objects straight in front of it. Will sense objects on the side - especially if you DON’T want it to ! :-) Is very useful and easy to program This ultrasonic sensor is connected to Port 4 and will do an action like go forward until the distance between it and an object is less than 26 cm.

27 Light Sensor Measures light on a scale of 0 (no light) to 100 (very bright) Must be calibrated in lighting where program will run Possible to turn off the infrared source so sensor only measures ambient light

28 Calibrating the Light Sensor Attach a light sensor and turn on your NXT. You’ll be at My Files. Arrow over to View and press orange button. Arrow over to Reflected light and press orange button. Arrow to the number of the port you connected your light sensor to and press the orange button.

29 Calibrating continued Place your NXT with the light sensor over the dark line (or whatever the darker, lower value light ) and write down the number that displays on the NXT. Place your NXT with the light sensor over the white or lighter area and write down the number that displays on the NXT. Add the two number together and divide by 2. This gives you the number you enter as the value for Light: in the Light Sensor Block properties window.

30 Why does the NXT wiggle when it follows the dark line? Motor B on, C off so robot will turn. You told it to turn until the light value is greater than 42. Then Motor C goes on and Motor B stops and the NXT turns the other direction until the light sensor reads a value of more than 42. That’s the source of the cute “sashay”.

31 See the light sensor and its programming in action.

32 Basic Programming with the Common Palette Loop Icon Very handy for making actions repeat Be careful! If you set the Loop block to unlimited (forever) it will keep doing that action until you shut it off our the battery dies! You can change Control to Sensor, Time, Count, or Logic

33 Basic Programming with the Common Palette Switch Block Icon and properties window Use this block to have your robot choose between two sequences of code. If light value is greater than 42, turn Motor B on and Motor C off. If light value is less than 42, Motor C on and Motor B off. The input value for the switch block can Be a sensor or a Logic value of number, text, or number

34 Troubleshooting Downloading and updating Firmware Handout from Kristie Brown, LEGO Education Representative for the Southeast.

35 Using the Feedback Block What provides feedback to the NXT? SensorsMotors Built-in timers Buttons on the Brick (Also, the Receive Message programming block lets you receive input from a message sent via Bluetooth.) You will learn specifics of using these in Intermediate Programming

36 Sensors for Feedback Sensors detect changes in conditions Touch - Haven’t hit wall. to Have hit the wall! Sensors can only respond to ONE condition at a time. The same light sensor icon cannot identify and follow both a red line and a black line Sensors can only respond True or False.

37 Timers for Feedback You will learn more about these in intermediate programming.

38 Buttons for Feedback Left, Right, and Enter (orange) buttons can be used for feedback. The Cancel button cannot.

39 Websites http://www.legoeducation.com http://coweb.cc.gatech.edu/ice-gt http://pacerobonotes.wetpaint.com http://pacerobonotes.wetpaint.com (Resources page of wiki has many more links) http://pacerobonotes.wetpaint.com http://coweb.cc.gatech.edu/ice-gt/135 - videos http://coweb.cc.gatech.edu/ice-gt/135 - videos http:washtington.edu/info/videos

40 Sources MINDSTORMS Education NXT “Getting Started with NXT”. Kelly, Jim. LEGO MINDSTORMS NXT-G Programming Guide.

41 Calibrate Sensors Select the light sensor and the port the sensor is connected to. Then click the Calibrate button. This will download a small program to the NXT and run it automatically. On the NXT’s screen you will see text that reads “Min Value:”. Point the light sensor towards a material or spot that represents what the light sensor should measure as dark. Press the orange Enter button on the NXT. Next you will see text that reads “Max Value:”. Point the light sensor towards a material or spot that represents the brightest location the sensor will encounter during the program. Press the orange Enter button again. Calibration is complete. Calibrating a sound sensor Select the sound sensor and the port the sensor is connected to. Then click the Calibrate button. This will download a small program to the NXT and run it automatically. On the NXT’s screen you will see text that reads “Min Value:”. Position the sound sensor in the environment it will encounter when the program is running and where any background noise is measurable. Press the orange Select button on the NXT. Next you will see text that reads “Select Max:”. Measure or make the loudest sound you want to measure and press the Select button again. Calibration is complete. Source: NXT Help button

42 Download to Multiple NXTs This function allows you to download one or more programs to multiple NXTs. This is especially useful if you need to load a number of NXTs with the same program(s) for a competition or classroom assignment. The Download to Multiple NXTs feature is only available in the educational version of the LEGO MINDSTORMS NXT Software. You can download a number of programs to an NXT until this memory is full. An average program is 11 kilobytes in size but this varies. When the memory is full, you can select programs to delete in order to make space. See the Help file “Managing files and memory on the NXT” for details. Note: Before using this function, make sure that all of the programs you would like to download are open in the software. When you open more than one program at the same time, the program names appear as tabs along the top of the work area (as shown in the graphic below). Also, make sure your bricks are "available" by pressing Scan in the NXT window. Otherwise they will not appear in the Download to Multiple NXTs window. Image – show at least three program tabs in a row and a bit of surrounding interface

43 When the programs that you would like to download are open, launch the function by choosing Download to Multiple NXTs... in the Tools menu. This will open the Download to Multiple NXTs dialog box, shown below. Image of Download to Multiple NXTs dialog box with callouts 1 & 2 marked 1. Choose NXTs lists all of the NXTs that are currently available. 1. Choose NXTs lists all of the NXTs that are currently available. 2. Choose Programs lists all of the programs that are currently open. 2. Choose Programs lists all of the programs that are currently open. Note: If you do not see an NXT in the list, close the Download to Multiple NXTs tool and open the NXT window (accessible from the controller). Make sure that all the NXTs have been configured in this window before launching the Download to Multiple NXTs tool. Downloading to Multiple NXTs First, choose the NXTs to which you would like to download by clicking in the box(es) to the left of the NXT names. You can select all available NXTs by clicking the Select All button below the list. Clicking the Deselect All button deselects all of the NXTs. Then choose the programs you would like to download by clicking the boxes to the left of the program names. When your selection is complete, click the Download button below the program list. This begins the download process. The progress columns display the download progress.

44 Download to Multiple NXTs During the compilation process there are four status messages that can be displayed in the Programs list box: * Skipped - if you did not select that program file * Skipped - if you did not select that program file * Compiling - if the file is currently compiling * Compiling - if the file is currently compiling * Done - when that program has been compiled * Done - when that program has been compiled * Error - if a problem is encountered while compiling the program * Error - if a problem is encountered while compiling the program Once all of the selected programs have been compiled, the download process begins. During download, there are four status messages that can be displayed in the NXT list box: * Skipped - if you did not select that NXT * Skipped - if you did not select that NXT * Downloading - if it is currently downloading to the NXT * Downloading - if it is currently downloading to the NXT * Done - when downloading all programs to that NXT is complete * Done - when downloading all programs to that NXT is complete * Error - if a problem is encountered during the download process * Error - if a problem is encountered during the download process Click the Close button when you are finished downloading programs to multiple NXTs. Note: To share programs between computers (allowing the programs to be edited on a different computer), you should exchange the.rbt file of the program by using email or a USB drive. Source NXT Help button


Download ppt "Introduction to NXT Software and Functionality Bot’oberfest October 15, 2007."

Similar presentations


Ads by Google