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

15
EducateNXT Line Following With One Light Sensor

Upload: amos-brett-price

Post on 18-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

Line FollowingWith One Light Sensor

Page 2: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

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).

Page 3: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

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

Page 4: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

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.

Page 5: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

Edge following or line following?

The easiest way to follow a line is to follow

the edge, moving on and off the black.

Page 6: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

When on white it needs to go to black.

When on black it needs to go to white.

?

?

Page 7: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

. . . And back to black again.

While doing this, it edges up the line.

Page 8: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

ForwardB

Stops

Basic Line Follow

Switch

Left

Page 9: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

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

Page 10: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

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

Page 11: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

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

1 2

3

Then Download.

Then drag the Switch into the Loop.

Page 12: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

Have some fun following the line . . .

Page 13: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

And for the teacher . . .

Page 14: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT

Finished Line (Edge) Follow Program

Page 15: EducateNXT Line Following With One Light Sensor. EducateNXT Attach a light sensor To attach a light sensor to the EduBot, refer to pages 32-33 of the

EducateNXT