Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program...

10
Urban Scholars Oct 11, 2008 McColgan 1 Siena College Make Your Robot Go Forward Open Robolab 2.9 by double clicking on the icon. Click on Programmer. Double click on Inventor 4.

Transcript of Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program...

Page 1: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 1 Siena College

Make Your Robot Go Forward Open Robolab 2.9 by double clicking on the icon.

Click on Programmer.

Double click on Inventor 4.

Page 2: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 2 Siena College

Delete the green light – select the green light and press the delete button on the keyboard. Use the SELECT tool to select the green light.

Replace with NXT green light

Delete green light

Page 3: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 3 Siena College

Click on the NXT green light and drop in program window.

Name the program - Use the text tool to select rbl. Delete rbl and type GO.

Page 4: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 4 Siena College

Add jumps and lands between the green and red lights.

To add the pink wires, use the wire tool. Click on the upper right of the green light. Then click on the upper left of the land. Wire the jump.

Page 5: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 5 Siena College

Add Fork (rotation sensor) and Merge to your program.

Page 6: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 6 Siena College

Add the numeric constant and the port to the rotation sensor fork.

Page 7: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 7 Siena College

Add the A and C motor commands and the stop command. Make sure the motors on your robot are plugged into ports A and C on the robot.

Download the program to your robot.

• Turn the robot on by pushing the orange button • Plug the cable into the robot • Push the white arrow in the program

• The program is loaded onto the robot when you hear the robot make a sound • Push the orange button on your robot twice and you’ll see the program GO • Push the orange button two more times to run your program • Push the dark grey button to stop your robot • Change the number to make your robot go further • Change the number so that your robot won’t go so far • Program your robot to go exactly 1 meter.

o Cut a piece of string so that it wraps around one wheel of your robot. This is how far your robot goes for each 360 value in your numeric constant. So, your wheel will turn 5 times for a value of 1800 in your numeric constant.

Page 8: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 8 Siena College

o Count how many string lengths it will take for your robot to go 1 meter using a meter stick.

o Mulitply the number of string lengths by 360 and enter this value in your numeric constant

o Download the program to your robot and see if it goes the correct distance. • Change how fast your robot goes by changing the speed (without an input to the

motors, they go at their fastest speed).

Page 9: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 9 Siena College

Let’s replace the rotation sensor fork with a light sensor fork. Instead of a motor port, we need a sensor port – plug your light sensor into port 1 on the robot. What will the robot do? Place a piece of tape on the floor. Get your robot to stop when it “sees” the tape.

What’s the difference between the program above and the program below?

Now control your robot using the sound sensor.

Page 10: Make Your Robot Go Forward - Siena Collegemmccolgan/UrbanScholars/USRobolab1011.pdf · • Program your robot to go exactly 1 meter. o Cut a piece of string so that it wraps around

Urban Scholars Oct 11, 2008

McColgan 10 Siena College

Next have your robot continue to move until you push the touch sensor. When the robot stops, have it make a sound.

Sound sensor fork

Touch sensor fork

Play a sound and change the sound by clicking on the fast rising sweep with the finger tool