Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming a light sensor to follow a black line.

Similar presentations


Presentation on theme: "Programming a light sensor to follow a black line."— Presentation transcript:

1 Programming a light sensor to follow a black line

2 Drag and drop a loop icon into the program.

3 Next, grab a Switch icon and drop it into the loop. You may need to hover over the loop for a second or two until it goes inside the loop. Switch the sensor to light sensor And put it on port 1. Also make sure that “generate light” is selected and set the value at 50 for now. You may have to tweak that number later.

4 Drag one motor into the top part of the switch. Make sure it’s: -in port C -it’s turned off

5 Drag a second motor into the top switch. Make sure that: -Port A is selected -The direction is set to reverse -Power is set to 50 -Duration is set to Unlimited

6 Drag a third motor into the bottom part of the switch. Make sure it’s: -in port A -it’s turned off

7 Drag a fourth motor into the bottom switch. Make sure that: -Port C is selected -The direction is set to reverse -Power is set to 50 -Duration is set to Unlimited

8 The finished product should look like this!

9 Download the program to your NXT robot and go try it out on the test track. Once you get it working, try modifying the Program to make it perform better!


Download ppt "Programming a light sensor to follow a black line."

Similar presentations


Ads by Google