An Introduction to VEX IQ Programming with Modkit

An Introduction to VEX IQ Programming with Modkit
Lesson Objective: The purpose of this lessons is to introduce the students to sensors.
Students will learn how sensors allow a robot to examine its environment and how this data can
be used to make decisions. The lesson will center on the VEX IQ distance sensor. From a
programming perspective conditional statements and nested loops will be introduced.
Lesson 03
Age range
Duration
Use of structures in Modkit for VEX IQ.
9-11
1 hour
Introduction to sensory information for robots, repeat structures,
conditional structures. Use of the distance sensor.
Learning outcomes
1. Students will understand the concept of sensors.
2. Students will understand how the distance sensor works.
3. Students will be able to use sensor data (distance sensor) in Modkit.
4. Students will know how to use conditional statements and operators.
5. Students will be able to program their robot to drive forward without crashing
Time
Activities
Link to
objective
5 mins
Introduction to sensors. Ask students how a robot can ‘sense’ its environment.
Compile a list of possible sensors (camera, distance, buttons,…)
LO 1
10 mins
Expand on the idea of the distance sensors. Ask students to locate and examine the
sensor. Mention how the sensor works (bounced back sound waves) and link to
biology (often inspiration for engineers). Which animal (bat) uses a similar system and
how is this system called (sonar). Start Modkit and examine the blocks related to the
distance sensor.
LO 1, 2
20 mins
Programming task. The students will create a program that makes the car drive
LO 2,3,4,5
forward; the car must stop before it hits a wall. Depending on the students’ experience
with other programming languages (such as scratch) show the students where to find
the conditional statements in Modkit and (if needed) explain the concept.
Allow students to make typical mistake of checking distance only once -> re-introduce
debugging concept.
20 mins
Programming task. Pupils are guided to create a program that will drive forward until
too close to a wall, reverse a bit, turn, drive until close to wall again,…
LO 2,3,4,5
5 mins
Review learning using open questions to the class. Allow pupils time to feedback and
share ideas.
LO 1, 2,4
1
Resources
Lesson 03 PowerPoint
Modkit Software (online or stand-alone)
VEX IQ Kit pre-built as sensor car:
Distance Sensor mounted on the front of the robot pointing forward.
Supporting Handouts:
 Vocabulary Sheet (Re-use sheet from Lesson 01)
Quick reference sheet: Blocks used in Modkit (Lesson 03)
Supporting Programs: (provided as mk4v files)
Don’t_Crash.mk4v – several variations.
2