Follow the Light
Students program LEGO robots to follow flashlight beams using EV3 color sensor input.Copyright (top) LEGO MINDSTORMS EV3; (bottom) 2009 Christian Reitter, Wikimedia Commons
http://iipdigital.usembassy.gov/st/english/article/2013/11/20131125287867.html#axzz2ll0npPnd
Students' understanding of how robotic color sensors work is reinforced in a design challenge involving LEGO® MINDSTORMS® EV3 robots and color sensors. Working in pairs, students program LEGO robots to follow a flashlight as its light beam moves around. Students practice and learn programming skills and logic design in parallel. They see how robots take input from color sensors and use it to make decisions to move, similar to the human sense of sight. Students also see how they perform the steps of the engineering design process in the course of designing and testing to achieve a successful program. A PowerPoint® presentation and pre/post quizzes are provided.
Color sensors are showing up in many products and devices. They can detect the ambient and reflected light of their surroundings and nearby objects, and be programmed to trigger follow-up behavior. For instance, many color sensors detect when it gets dark and "automatically" turn on streetlamps, headlights and parking lot lights. It is common to find cameras that use color sensors to monitor buildings, stores and schools. Other color sensors are used to read the numbers from swiped credit cards.
Computer programming is a component of many modern engineering designs. As students design robot programs in this activity, they begin with a "goal" or "concept" of what the program solution needs to do, before they begin writing the code. Next, the process of working on the code and "debugging" it inherently constitutes "revising and improving their designs based on the results of testing." In that sense, the thought processes required to code programs that meet problem constraints are very similar, if not identical, to the thought processes required for traditional engineering design of physical structures and products.
After this activity, students should be able to:
- Program a LEGO robot to take input from color sensors and activate motors to follow a light source.
- Explain how the program and the color sensors work.
- Relate the program (robotic response to color sensor information) to human responses to light.
