0% found this document useful (0 votes)
29 views

Line Detection: Student Worksheets

Uploaded by

Smati Djamel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Line Detection: Student Worksheets

Uploaded by

Smati Djamel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Line Detection

Student Worksheets
Design ways to improve driving safety by helping to
prevent drivers from falling asleep and causing an
accident.

LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS logo are trademarks and/or copyrights of the LEGO Group.
©2017 The LEGO Group. All rights reserved. 2017.04.20. 62
1
Student Worksheets
CONNECT
Make sure that you can answer the following questions:
– Can autonomous cars react to different traffic light signals?
– What can happen if a driver falls asleep while driving?
– How can we detect when a driver is falling asleep?

Think about what you have learned, then document it. Describe the problem in your own words.
Creatively record your ideas and findings.

CONSTRUCT
Build
Start by constructing this model.

Program
Autonomous cars need to recognize and respond to traffic lights automatically.
Create a program that will make your robot stop at red lights.
Refine your program by making it stop at an appropriate distance from the
traffic lights.
Make sure your robot is only responding to the color red.
Once you have succeeded, program your robot to drive forward again when the light changes from
red to green.
Use the Color Sensor and the Switch Block to make decisions (Boolean logic). These two blocks will
allow the robot to make choices based on the colors it sees.

LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS logo are trademarks and/or copyrights of the LEGO Group.
©2017 The LEGO Group. All rights reserved. 2017.04.20. 63
2
Consider using these blocks in your solution:

Think about what you have learned, then document it. Describe your pseudocode for this task.
Creatively record your ideas and findings.

CONTEMPLATE
To simulate what could happen if a driver falls asleep while driving, your robot could sound an alarm
signal when it crosses the line. This feature is often available in new cars.
Program your robot to perform this function.

Think about what you have learned, then document it. Describe your pseudocode for this task.
Creatively record your ideas, and findings.

Di≠erentiation option
Program your robot to drive on “autopilot” along a given route. You will need to create a program that
recognizes and responds to a dark line (or white line). You will create a line-following program and
your robot will need to travel along the line without losing contact with it.
You will need to constantly debug your program in order to make your robot travel as smoothly as
possible along the line.

LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS logo are trademarks and/or copyrights of the LEGO Group.
©2017 The LEGO Group. All rights reserved. 2017.04.20. 64
3
Consider adding this blocks to your solution:

Reflect and document your learnings. Describe your pseudo-code for this task. Creatively record your
ideas, and findings.

Share
Think about what you have learned, then document it. Creatively record and present your ideas,
creations, and findings.

Consider the following questions:


What challenged you? Where there any surprises? How could you improve your program?
Could your program have been more streamlined? Have you used too many blocks?
Is there a more efficient way of building your program?
How could your program be used in real-world scenarios?

CONTINUE
Explore text-based programming solutions for this lesson and compare these solutions using
different programming languages.

LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS logo are trademarks and/or copyrights of the LEGO Group.
©2017 The LEGO Group. All rights reserved. 2017.04.20. 65
4

You might also like