educatenxt line following with one light sensor. educatenxt attach a light sensor to attach a light...

Post on 18-Dec-2015

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

EducateNXT

Line FollowingWith One Light Sensor

EducateNXT

Attach a light sensor

To attach a light sensor to the EduBot, refer to pages 32-33 of the NXT Building Guide (that

comes with the Education Kit).

EducateNXT

Click

twice to

Then keep clicking untilNow select the port the light sensor is in, probably Port 3.

Reading the value of your light sensor

Select

EducateNXT

Light readings for lots of things

Midair ____________Colored surface (Color ________ ) ____________Colored surface (Color ________ ) ____________Colored surface (Color ________ ) ____________ Darkest reading ____________Brightest reading ____________Black line on line follow board ____________White area on line follow board ____________

Try getting light sensor readings for the following:

Note: The light sensor does not read color. It reads how much light is reflected – which is different for different colors.

EducateNXT

Edge following or line following?

The easiest way to follow a line is to follow

the edge, moving on and off the black.

EducateNXT

When on white it needs to go to black.

When on black it needs to go to white.

?

?

EducateNXT

. . . And back to black again.

While doing this, it edges up the line.

EducateNXT

ForwardB

Stops

Basic Line Follow

Switch

Left

EducateNXT

Basic Line Follow

The trigger point value determines when the sensor is seeing black or white. It is the average between the black % and white %.

The Switch blockand its configuration panel

(Black% + White%) ÷ 2

EducateNXT

Basic Line FollowA partially completed line-follow program should look like this . . .

Set Move block duration to “Unlimited.”

IMPORTANT

Don’t download yet…

What still needs to be added

EducateNXT

Add a Loop block. (The EduBot needs to line follow forever.)

1 2

3

Then Download.

Then drag the Switch into the Loop.

EducateNXT

Have some fun following the line . . .

EducateNXT

And for the teacher . . .

EducateNXT

Finished Line (Edge) Follow Program

EducateNXT

top related