Explore more at LEGOeducation.com

5 stars based on 35 reviews

In the following, an improved version, based on Fuzzy-Logic, is presented. The original version by Lego uses the reflected light to line follower code nxt robot sources between black the line and white the floor. When the sensor is on the white surface, the right motor is activated and the robot turns left.

In this way, the robot follows the line. The approach is very simple and effective. However, as the robot only distingushes between black and white, the resulting movement looks as if it would be drunk. The idea behind line follower code nxt robot sources new version is, not only to distinguish between black and white, but to consider various degrees of grey.

If the sensor is exactly on the boundary, it will see a colour that is between black and white. The more the sensor gets on the line, the blacker the perceived colour is. On the other hand, the more the sensor gets on the white surface, the whiter the perceived colour is. This is called Fuzzy Logic as we do not consider absolute states Boolean Logic, here "Black and White" but different degrees of those states Whiter, Blacker.

Now we are not limited anymore to turn only left and line follower code nxt robot sources, but can turn more right blacker colour or more left whiter colour.

In this way, if exactly on the colour boundary, the robot runs straight ahead. The program consists of three loops that run at the same time. The first loop reads the current reflected light value and stores it in the variable called "Number 1".

The second and third loop control the left and right motors. The reflected light sensor gives a value between 0 and A typical value for a black surface is around 20 and for a white surface something around These values depend of on the ambient right conditions and the distance of the sensor from the surface. The motor power itself as well is a value between 0 and To produce the motor commands as described in the schema, the following calculations have to be done:.

If you program your NXT with the above program, and the robot does not run as expected, check the following:. Original Line Follower Courtesy of Davidin2.

The balance of payments exchange rates and trade deficits by countries

• Yanis varoufakis bitcoin stock price

Design ways to improve driving safety by helping to prevent drivers from falling asleep and causing an accident. Explore the concept of the Loop. Understand the concept of a switch and how to use it for true and false operations. Allow the students to select the tool s they find most appropriate for capturing and sharing their ideas. Encourage them to document their thoughts using text, videos, images, sketchnotes, or another creative medium.

Explain to the students that they will once again be using the Color Sensor. They will extend their understanding of how this sensor reacts to light by using reflected light intensity to create a program that will drive their wheeled robot along a given track.

Tell them that they will use the Color Sensor to make their wheeled robot move more autonomously in order to simulate how an autonomous car might respond to traffic lights. They will create a program that will make their wheeled robot drive around a given course or track. Build Students will construct the Robot Educator base model, and then they will add the Color Sensor pointing down.

Program Have the students begin a new project in the EV3 programming environment. Allow the students to select the tool s they find most appropriate for capturing and sharing their pseudocode. Encourage them to use text, videos, images, sketchnotes, or another creative medium. Note Refer students to the Robot Educator Tutorials for further assistance. In the EV3 Software: Students will need to use the Wait Block to do this. Point out that the Wait Block can be configured to be triggered by multiple colors, or just one.

In this case, students will create a program that uses the Color Sensor to stop the motors when it detects the color red. Point out to the students that they will need to make sure all other colors are deselected for the Color Sensor to respond most effectively to the colors they choose red and green.

Explain also that they will be exploring how switches work, and how to incorporate these into their programs.

Explain that they will be exploring how loops work and how to incorporate these into their programs. Setup Use the technic beams available in the EV3 core set to simulate green and red lights. Place the beams on the table so the Color Sensor can detect them while rolling over them. Students should use the same function of the Color Sensor to recognize when the robot is crossing a line. Use a thick approx. Have the students simulate alarm signal for the driver if the robot is crossing this line.

This feature is often available in new cars. Start motors B and C drive forward with a curve away from the line. Wait for the Color Sensor to detect the color white. Repeat steps 2 to 6 forever.

Differentiation Option The students will create an automated, driverless vehicle that can follow a line. Have the students explore how an automated vehicle might be guided along a road or track.

The students will need to be introduced to the Switch Block, which will operate inside a loop. Explain that the Switch Block can be used to automate a program that allows the wheeled robot to operate autonomously. Also explain that the Switch Block can be used to control the flow of a program and that the default Switch Block, using the Touch Sensor, is a classic example of Boolean logic.

In other words, the wheeled robot will turn left and then right depending on whether the line i. Find a suitable video online to demonstrate an example of this to the students. Once the wheeled robot is following the line, can it be improved to behave more like a car i. Note Students will once again use the Color Sensor, but this time they will need to program it so that it responds to reflected light intensity.

They will need to take reflected light intensity readings from the Port View in order to gauge what value to input into the Wait Block. This will work best using black or blue tape on a very light or white surface. You will need to spend some time explaining the concept of a switch and how it is an example of Boolean logic. A possible extension from here would be to add a second Color Sensor, and combine the line-follow and traffic light programs to simulate automated passenger services, such as a train system in an airport.

Share Allow the students to select the tool s they find most appropriate for capturing and sharing their creations, unique thinking, and learning process. This lesson has covered a lot of new concepts and introduced several new blocks from the EV3 Software.

Use this time to recap this information and ensure that the students understand it. Ask one or two groups to demonstrate their programs. Ask the students to share what they expected to happen vs. Ask them whether anything about the results of their programs surprised them.

Assessment Opportunity Specific rubrics for assessing computational thinking skills can be found under 'Assessment'. Using text-based Programming Have the students explore text-based programming solutions so they can compare different programming languages.

Guide to reinstalling EV3 Brick. Products Files Page Downloads Lessons. You have no items in your basket. Explore more at LEGOeducation. View online Download pdf. Ignite a classroom discussion around 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? Have the students perform the following building check before they program their robots: Are the wheels rotating freely? Are the wires correctly connected from the Color Sensor to port 3? Start motors B and C drive forward. Wait for the Color Sensor to detect the color red. Wait for the Color Sensor to detect the color green.

Repeat steps 2 to 5 forever. Start motors B and C drive forward with a curve toward the line. Wait for the Color Sensor to detect the color black, then start tasks 1 and 2. Wait for the Color Sensor to detect the color black. The robot then stops. The maximum quantity of an item that can purchased in each transaction is To inquire about purchasing more than 99 of one item, please call