Prepare. Read through this teacher material. If you feel it is needed, plan a lesson using the getting started material in the EV3 Lab Software or Programming App. Using two Touch SensorsExplain that in today’s lesson, your students will utilize two Touch Sensors to control and maintain the speed of their Driving Base model.
EMISSION CONTROL SYSTEMS. The clean air act of 1977 set limits as to the amount of each of these pollutants that could be emitted from an automobile. The manufacturers answer was the addition of certain pollution control devices and the creation of a self adjusting engine. 1981 saw the first of these self adjusting engines.
Coding TipsYour students will most likely use a Variable Block for this project. A Variable Block is a programming block that can store data (i.e., text, logic, a numeric, or arrays), which can be overwritten at any time while the program is running.A variable is a way of storing updatable values in a program. The value stored in a variable can be overwritten time and time again as long as the program is running.Increase Speed with Variable Program. Explanation of the Program. Start the program. Create a Variable Block called “Speed,” enter a value of 0 and start two tasks.TASK 13. If Touch Sensor 1 is pressed:a.
Read the variable called “Speed.”b. Add '10' to the read value.c.
Write the result in the variable called “Speed.”d. Read the variable called “Speed.”e. Start motors B and C at a speed set to the value stored in the variable called “Speed” ELSE (do nothing).
Repeat steps 3a to 3e forever.TASK 25. If Touch Sensor 2 is pressed:a. Read the variable called “Speed.”b.
Subtract '10' from the read value.c. Write the result in the variable called “Speed.”d. Read the variable called “Speed.”e.
Start motors B and C at a speed set to the value stored in the variable called “Speed” ELSE (do nothing). Repeat steps 5a to 5e forever.Increase and Decrease Speed with Variable and DisplayHave your students use the Display Block to display the speed of the Driving Base. Increase Speed with Variable #!/usr/bin/env pybricks-micropythonfrom pybricks import ev3brick as brickfrom pybricks.ev3devices import Motor, TouchSensorfrom pybricks.parameters import Port, Stop, Buttonfrom pybricks.tools import waitfrom pybricks.robotics import DriveBase# Configure 2 motors with default settings on Ports B and C. These# will be the left and right motors of the Driving Base.leftmotor = Motor(Port.B)rightmotor = Motor(Port.C)# The wheel diameter of the Robot Educator Driving Base is 56 mm.wheeldiameter = 56# The axle track is the distance between the centers of each of the# wheels. This is 118 mm for the Robot Educator Driving Base.axletrack = 118# The Driving Base is comprised of 2 motors. There is a wheel on each# motor.
The wheel diameter and axle track values are used to make the# motors move at the correct speed when you give a drive command.robot = DriveBase(leftmotor, rightmotor, wheeldiameter, axletrack)# Set up the Touch Sensor on Port 1. It is used to increase the speed# of the robot.increasetouchsensor = TouchSensor(Port.S1)# Initialize the 'oldspeed' variable to 'None.' It is used to check# whether the speed variable has changed. Setting it to 'None' ensures# this check will be 'True' when the speed variable is initialized with# a value.oldspeed = None# Initialize the speed variable to 0.speed = 0# This is the main part of the program. It is a loop that repeats# endlessly.while True:# Check whether the Touch Sensor is pressed, and increase the speed# variable by 10 mm per second if it is.if increasetouchsensor.pressed:speed += 10# If the speed variable has changed, update the speed of the robot.if speed!= oldspeed:oldspeed = speedrobot.drive(speed, 0)# Wait 200 milliseconds before starting the loop again.wait(200).
Increase and Decrease Speed with Variable #!/usr/bin/env pybricks-micropythonfrom pybricks import ev3brick as brickfrom pybricks.ev3devices import Motor, TouchSensorfrom pybricks.parameters import Port, Stop, Buttonfrom pybricks.tools import waitfrom pybricks.robotics import DriveBase# Configure 2 motors with default settings on Ports B and C. These# will be the left and right motors of the Driving Base.leftmotor = Motor(Port.B)rightmotor = Motor(Port.C)# The wheel diameter of the Robot Educator Driving Base is 56 mm.wheeldiameter = 56# The axle track is the distance between the centers of each of the# wheels. This is 118 mm for the Robot Educator Driving Base.axletrack = 118# The Driving Base is comprised of 2 motors. There is a wheel on each# motor. The wheel diameter and axle track values are used to make the# motors move at the correct speed when you give a drive command.robot = DriveBase(leftmotor, rightmotor, wheeldiameter, axletrack)# Set up the Touch Sensor on Port 1. It is used to increase the speed# of the robot.increasetouchsensor = TouchSensor(Port.S1)# Set up the Touch Sensor on Port 2.
It is used to decrease the speed# of the robot.decreasetouchsensor = TouchSensor(Port.S2)# Initialize the 'oldspeed' variable to 'None.' It is used to check# whether the speed variable has changed.
Setting it to 'None' ensures# this check will be 'True' when the speed variable is initialized with# a value.oldspeed = None# Initialize the speed variable to 0.speed = 0# This is the main part of the program. Increase and Decrease Speed with Variable and Display #!/usr/bin/env pybricks-micropythonfrom pybricks import ev3brick as brickfrom pybricks.ev3devices import Motor, TouchSensorfrom pybricks.parameters import Port, Stop, Buttonfrom pybricks.tools import waitfrom pybricks.robotics import DriveBase# Configure 2 motors with default settings on Ports B and C. These# will be the left and right motors of the Driving Base.leftmotor = Motor(Port.B)rightmotor = Motor(Port.C)# The wheel diameter of the Robot Educator Driving Base is 56 mm.wheeldiameter = 56# The axle track is the distance between the centers of each of the# wheels. This is 118 mm for the Robot Educator Driving Base.axletrack = 118# The Driving Base is comprised of 2 motors.
There is a wheel on each# motor. The wheel diameter and axle track values are used to make the# motors move at the correct speed when you give a drive command.robot = DriveBase(leftmotor, rightmotor, wheeldiameter, axletrack)# Set up the Touch Sensor on Port 1. It is used to increase the speed# of the robot.increasetouchsensor = TouchSensor(Port.S1)# Set up the Touch Sensor on Port 2.
It is used to decrease the speed# of the robot.decreasetouchsensor = TouchSensor(Port.S2)# Initialize the 'oldspeed' variable to 'None.' It is used to check# whether the speed variable has changed. Setting it to 'None' ensures# this check will be 'True' when the speed variable is initialized with# a value.oldspeed = None# Initialize the speed variable to 0.speed = 0# This is the main part of the program. To incorporate language arts skills development, have your students:. Use their written work, sketches, and/or photos to summarize their design process and create a final report. Create a video demonstrating their design process starting with their initial ideas and ending with their completed project.
Create a presentation about their program. Create a presentation that connects their project with real-world applications of similar systems and describes new inventions that could be made based on what they have created. Teacher Observation ChecklistCreate a scale that matches your needs, for example:.
Partially accomplished. Fully accomplished. OverachievedUse the following success criteria to evaluate your students' progress:. Students can identify the key elements of a problem. Students are autonomous in developing a working and creative solution. Students can clearly communicate their ideas.Self AssessmentOnce your students have collected some performance data, give them time to reflect on their solutions. Help them by asking questions, like:.
Is your solution meeting the Design Brief criteria?. Can your robot’s movement(s) be made more accurate?. What are some ways that others have solved this problem?Ask your students to brainstorm and document two ways they could improve their solutions.Peer FeedbackEncourage a peer review process in which each group is responsible for evaluating their own and others’ projects. This review process can help students develop skills in giving constructive feedback as well as sharpen their analysis skills and ability to use objective data to support an argument.