For this lesson you will not need to build anything, just get familiar with the how Lego Mindstorms works.
1. Lets start by opening up Lego Mindstorms Educator.
2. Hook up the nxt mainframe to the USB (make sure it is charged.)
3. From the opening screen, click File > New at the top left corner.
4. On the left hand side of the screen, there is a tab pallette - Make sure this is on
Common / (The Green Circle of the pallette is seletcted.)
5. Drag and drop the sound file onto the middle of the screen.
6. From here you will be able to see some sound attributes at the bottom of the screen.
7. Click tone, and then click the play button on the middle of the page to upload and play on the nxt mainframe (make sure it is plugged into the usb!).
8. Now try and make the robot play the chords E,F,G,A,B - by dragging and dropping
more sound files onto the middle of the screen. It should look something like this:
Lesson 2 - Make The Robot Do A 360 Degrees Turn. For this lesson you will require the robots to have wheels for movement.
For this lesson you will require the robots to have wheels for movement.
1. Click File > New at the top left corner.
2. On the left hand side of the screen, there is a tab pallette - Make sure this is on Common / (The Green Circle of the pallette is seletcted.)
3. Drag and drop the move button onto the middle of the screen.
4. From here you will be able to see some moving attributes at the bottom of the screen such as Direction, Rotation and Steering.
5. Click the Power tab and make sure this is on maxium power.
6. On the Steering tab click on the scroll-bar and move it as far to the right as possible.
7. On the Duration tab, select it so it does 2 rotations.
8. Now click the play button on the middle of the screen to upload and play on the robot.
9. Now try and make the robot turn 360 degrees - see below a screen shot if you are having trouble
Lesson 3 - Make The Robot Go Forward, Stop Then Reverse Back. For this lesson you will require the robots to have wheels for movement.
1. Click File > New at the top left corner.
2. On the left hand side of the screen, there is a tab pallette - Make sure this is on Common / (The Green Circle of the pallette is seletcted.)
3. Drag and drop the move button onto the middle of the screen. Do this three times.
4. From here you will be able to see some moving attributes at the bottom of the screen such as Direction, Rotation and Steering.
5. Make sure you have selected the first building block on the middle of the screen
6. Click the Power tab and make sure this is on maxium power.
7. On the Steering tab click on the scroll-bar and make sure this is at the centre.
8. On the Direction tab, make sure it is facing forwards.
9. On Duration tab, make sure you select 8 Rotations.
10. Now click on the next building block.
11. On the direction pallete at the bottom of the screen, select the stop symbol.
12. Now click the play button on the middle of the screen to upload it to the robot.
13. Now that you have the robot going forwards and stopping. See if you can make it go backwards after it stops. See below for hints:
Lesson 4 - Lego Robot Reacting To Light. For this lesson you will require the robots to have wheels for movement and have the light sensor attached.
1. Click File > New at the top left corner.
2. On the left hand side of the screen, there is a tab pallette - Make sure this is on Complete / (The three different colour squares.)
3. Click on the flow tab(the orange shape) and drag and drop the switch loop onto the main screen.
4. Check to see the control is set to forever at the bottom of the screen.
5. Now click on the sensor tab (the yellow shape with an arrow) and drag and drop the light sensor within the loop in the middle of the screen.
6. Click on the light sensor and make sure the generate light box is clicked at the bottom of the screen.
7. Now click on the comoon tab (the green circle) and drag and drop the move block next to the light sensor within the loop. This should expand automatically.
8. Click on the move block. At the bottom of the screen, select duration as unlimited and make sure the scrollbar on steering is all the way to the right.
9. Now on both boxes click the bottom of each of the boxes to expand the screen as per below image.
10. Now click on the intensity tab on the drop down box on the light sensor and drag it to the power tab on the moving drop down box. There now should be a yellow line linking them.
11. Now click the play button to upload it to the robot. Aim a light at the sensor to make it move!
Lesson 5 - Lego Robot Reacting To Distance . For this lesson you will require the robots to have wheels for movement and have the ultrasonic sensor attached.
1. Click File > New at the top left corner.
2. On the left hand side of the screen, there is a tab pallette - Make sure this is on Complete / (The three different colour squares.)
3. Click on the flow tab(the orange shape) and drag and drop the switch loop onto the main screen.
4. Check to see the control is set to forever at the bottom of the screen.
5. Now click on the sensor tab (the yellow shape with an arrow) and drag and drop the ultrasonic sensor within the loop in the middle of the screen. Make sure at the bottom that the show option is set to inches.
6. Now click on the Red Cross Tab and drag and drop the Math Block to the right of the ultrasonic sensor within the loop.
7. At the bottom of the screen change the operation to subtraction and put 100 in the A text box.
8. Now click on the comon tab (the green circle) and drag and drop the move block to the right of the math block.
9. At the bottom of the screen make sure the direction is facing backwards and duration is set to unlimited.
10. Now expand all the drop down boxes as you did in the previous lesson.
11. Link the distance tab on the ultrasonic dropdown box to the b tab on the math drop down box. Then link the result tab on the math drop down box to the result tab on the moving drop down box.
12. Now click the play button to upload it to the robot. Put your hand in front of the sensor to see it in action. Below is a screen shot of what your code should look like.
Lesson 6 - Lego Robot performing all the things in previous tasks at once. For this lesson you will require the robots to have wheels for movement and have the ultrasonic sensor & light sensor attached.
1. As per previous lessions click file > new at the top left hand corner.
2. On the left hand side of the screen, there is a tab pallette - Make sure this is on Complete / (The three different colour squares.)
3. From here, move different lego blocks onto the main screen including the ultrasonic and light sensors and create some code, so that the robot can incorporate everything you have learned from the other lessons.
4. Below is the design I have created. It moves forward until it reaches some light, it then travels backwards 8 rotations and plays a sound. From here it then moves forward again until it reaches a wall of some description and then goes backwards again 8 rotations.
5. If you have trouble finding some ideas look through the previous lessons or try and recreate the idea I have created.
No comments:
Post a Comment