TIJ 1O Programming and Interfacing with the Lego Mindstorm Robot 2

Total Page:16

File Type:pdf, Size:1020Kb

TIJ 1O Programming and Interfacing with the Lego Mindstorm Robot 2

TIJ 1O Programming and Interfacing With the Lego Mindstorm Robot 1

Day 1 and 2 * You are to answer all of these questions in a separate Word document for each day. For each activity, you will save the sheet as GroupNameDay1.doc

Ex. If your group name is Green Machine, then your Day 1 assignment would be saved as GreenMachineDay1.doc 1 Take note of the Robot Educator on the right side of the screen. The Robot Educator has labs for all of the tools in the Common Palette and the Advanced Palette. The labs under each title are for you to follow in order to learn each tool of each palette. You are about to do all of these short labs.

The actual palettes of tools are on the left side of the screen.

You must run through the labs in order, using the Challenge Brief, Building Guide, and Programming Guide of each lab in order to complete the lab.

You will be saving your files with the same name as the lab. For example, the first lab you save is

01 Play Sound

Make sure that you stick with this naming convention! It will make it very easy for you to call up your labs to download to the robot when it is connected.

You are marked daily on the assignment sheets. TIJ 1O Programming and Interfacing With the Lego Mindstorm Robot 2

Day 1 and 2

There are ten robot kits available, and therefore you will need to work co-operatively in groups in order to download your programs and see them function on the robot.

3

Notice in the Challenge Guide that you are going to be entering a command to the robot to generate sounds. In the Building Guide it shows that there is nothing to construct on the robot. Use the Programming Guide video to complete the lab, answering these questions.

a. The Configuration Panel only displays when:

b. What are the two choices under Action?

c. What is the one Function available with a sound block?

Save your program as 01 Play Sound

4

From the Challenge Brief and the Building Guide it is clear that we are going to learn to display an image on the display of the NXT robot, and we don’t have to make any modifications to the robot in order to do so. Do the lab in the Programming Guide by following the video. TIJ 1O Programming and Interfacing With the Lego Mindstorm Robot 3

Day 1 and 2

a. What are the other Actions possible?

b. What is the meaning of the x and y co-ordinate in the Configuration Panel? Determine this by moving the Happy Face within the box.

c. What is the purpose of the timer within the lab?

Save your program as 02 Use Display

5

From the Challenge Brief and the Building Guide it is clear that we are going to learn to make the motor drive the NXT robot. This is the first lab where we are going to have to build something. First, build the portion of the robot required using the Building Guide. Next, do the lab in the Programming Guide by following the video.

a. From the Configuration Window of the Move control, what is the meaning of Ports A, B, and C? Look at the robot control to see if you can find these ports.

b. Why are the ports listed in the Steering dialogue? Hook up your motors to the necessary input ports on the robot using the input cables in the kit.

c. Use the More Help link to determine the meaning of the green boxes on the left side of the dialogue box.

6

From the Challenge Brief and the Building Guide it is clear that we are going to learn to TIJ 1O Programming and Interfacing With the Lego Mindstorm Robot 4

Day 1 and 2 make the motor drive the NXT robot in reverse. This is the first lab where we are going to have to build something. First, build the portion of the robot required using the Building Guide. This is no different than what you built in lab 3 for moving forward. Next, do the lab in the Programming Guide by following the video.

a. Notice that it’s the same Move control and the same configuration panel as for the lab on moving forward. What is the one difference in this lab?

Save your program as 04 Reverse

7.

From the Challenge Brief and the Building Guide it is clear that we are going to learn to make the motor drive the NXT robot and accelerate. Use the same Building construction as for the labs 3 and 4. Next, do the lab in the Programming Guide by following the video.

a. Notice that whenever you want to accelerate the robot to a new speed (measured as a percent of maximum speed) you must add a new Move control. Try adding a series of move controls to make the robot go from zero to 25% to 50%, back to 25% and back to 0% speed.

Save your program as 05 Accelerate

8 Try to download this program, 05 Accelerate, and the other 4 programs that you made, to the Lego Mindstorm NXT. Use the tutorial offered on the first screen

to learn the steps involved for downloading a program. Try it. See if you can get your robot to execute all of your programs.

Recommended publications