Hands-on Activity Putting It All Together:
Programming Robotics Peripheral Vision

Quick Look

Grade Level: 12 (11-12)

Time Required: 5 hours

(six 50-minute periods)

Expendable Cost/Group: US $0.00

This activity requires (non-expendable/reusable) use of computers and software.

Group Size: 3

Activity Dependency:

Subject Areas: Computer Science

NGSS Performance Expectations:

NGSS Three Dimensional Triangle

Hands typing on a laptop.
Let the coding begin!
Copyright © 2004 Microsoft Corporation, One Microsoft Way, Redmond, WA 98052-6399 USA. All rights reserved.


In this culminating activity of the unit, students bring together everything they've learned in order to write the code to solve the Grand Challenge. The code solution takes two images captured by robots and combines them to create an image that can be focused at different distances, similar to the way that humans can focus either near or far. They write in a derivative of C++ called QT; all code is listed in this activity.
This engineering curriculum aligns to Next Generation Science Standards (NGSS).

Engineering Connection

For a robot to be useful, software must be written to enable it to perform its functions. This is one of the main phases in the design and construction of robots. In this activity, students write the software for their hypothetical robot. In a real-life situation, computer programmers would work closely with electrical and computer engineers in designing the software for the robot to function as intended.

Learning Objectives

After this activity, students should be able to:

  • Initialize a two-dimensional array.
  • Initialize a new instance of a vector class.
  • Store RGB values in a vector.
  • Read data from the vector and write it to a new image.
  • Create, compile and test code that addresses the Grand Challenge.
  • Explain how this code writing process is similar to what a computer science engineer "does."

Tennessee State Standards for C++ Programming Applications (2005)

  • Standard 5.0 - The student will write and document an executable program in C++ programming language.

Educational Standards

Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.

All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).

In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

NGSS Performance Expectation

HS-ETS1-4. Use a computer simulation to model the impact of proposed solutions to a complex real-world problem with numerous criteria and constraints on interactions within and between systems relevant to the problem. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Use mathematical models and/or computer simulations to predict the effects of a design solution on systems and/or the interactions between systems.

Alignment agreement:

Both physical models and computers can be used in various ways to aid in the engineering design process. Computers are useful for a variety of purposes, such as running simulations to test different ways of solving a problem or to see which one is most efficient or economical; and in making a persuasive presentation to a client about how a given design will meet his or her needs.

Alignment agreement:

Models (e.g., physical, mathematical, computer models) can be used to simulate systems and interactions—including energy, matter, and information flows—within and between systems at different scales.

Alignment agreement:

  • Use computers and calculators to access, retrieve, organize, process, maintain, interpret, and evaluate data and information in order to communicate. (Grades 9 - 12) More Details

    View aligned curriculum

    Do you agree with this alignment?

  • Use various approaches to communicate processes and procedures for using, maintaining, and assessing technological products and systems. (Grades 9 - 12) More Details

    View aligned curriculum

    Do you agree with this alignment?

Suggest an alignment not listed above

Materials List

Each group needs access to a computer and supporting software (QT) for writing code.:

Worksheets and Attachments

Visit [www.teachengineering.org/activities/view/van_robotic_vision_activity3] to print or download.

Pre-Req Knowledge

Familiarity with QT and the basic functions within the QT libraries imageloader, QtGui, QString, cmath and QVector.


In this activity, you will take all the lessons taught up to this point and combine the knowledge and skills you have gained to write the code that provides a solution to the Grand Challenge. This will fulfill the "research and revise" and "test your mettle" steps of the Legacy Cycle as you learn about the coding, write it yourself, test your program by running it, and revise until it is functional. Finally, being able to show your functioning program meets the "go public" stage of the Legacy Cycle as we finally answer the Grand Challenge.

Let's recall the Grand Challenge: "The Wall-e robotics firm thinks it has a unique and novel solution for getting a broader spectrum of usable data. Instead of using a single camera, they mounted on the top of the robot two cameras at different focal lengths. The first camera provides an up-close and detailed image (however, this image lacks surrounding data) and the second camera provides a broader view with less detail. However, they need this data to be usable by a humans. Right now a person must look at two separate pictures. Could you somehow combine those images to simulate how a human's vision would focus in and out of the two focal lengths? How would you accomplish this task?"

You will write the code in QT, a language similar to C++. Let the coding begin!


Before the Activity

  • Arrange for the necessary computer and software access for six class periods.
  • Make sure that the computers are working.

With the Students

  1. Present the Introduction/Motivation content to the class.
  2. Have students list the concepts they now understand that will help them write the code. Expect these to include information about vision, lenses, digital images, color formats and arrays, as well as concepts such as focal length, foveal vision, peripheral vision, pixel, RGB, hexadecimal and subscript. Indicate that this is the sort of background information software engineers and computer science engineers might need to learn about if they were given the Grand Challenge as an engineering project. Tell students that they will be performaing as computer science engineers as they write a code solution.
  3. Remind students of the time limitations for this activity. Give them six class periods to write code, test it and deploy the program.
  4. Remind students of the Learning Objectives (write them on the classroom board or a place where they can easily see them throughout the activity).
  5. Divide the class into groups of three students each. Oversee and guide the students to write, test and improve until they obtain a functioning code solution.


code: File(s) of statements written in one of many human-readable programming languages that are used to manipulate computers to perform many different actions.

QT: A coding application that runs off an enriched version of C++.


Functioning Code: Assess student groups on the success of their completed programs. See the Suggested Program Code Solution for a programming solution algorithm that students should work towards developing.


Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

More Curriculum Like This

High School Lesson
The Grand Challenge: Simulating Human Vision

Students are introduced to the Robotics Peripheral Vision Grand Challenge question. They are asked to write journal responses to the question and brainstorm what information they require in order to answer the question. Students draw a basis for the average peripheral vision of humans and then compa...

High School Unit
Robotics Peripheral Vision

This unit leads students through a study of human vision and computer programming simulation. Students apply their previous knowledge of arrays and looping structures to implement a new concept of linked lists and RGB decomposition in order to solve the unit's Grand Challenge: writing a program to s...

High School Lesson
How Do You Store All This Data?

During this lesson, students start to see the data structure they will use to store their images, towards finding a solution to this unit's Grand Challenge. Students are introduced to two-dimensional arrays and vector classes.


"Programming Code." Last updated June 20, 2010. Wikipedia, The Free Encyclopedia. Accessed June 20, 2010. http://en.wikipedia.org/wiki/Programming_code


© 2013 by Regents of the University of Colorado; original © 2010 Vanderbilt University


Mark Gonyea; Anna Goncharova; Rachelle Klinger

Supporting Program

VU Bioengineering RET Program, School of Engineering, Vanderbilt University


The contents of this digital library curriculum were developed under National Science Foundation RET grant nos. 0338092 and 0742871. However, these contents do not necessarily represent the policies of the NSF, and you should not assume endorsement by the federal government.

Last modified: March 17, 2018

Free K-12 standards-aligned STEM curriculum for educators everywhere.
Find more at TeachEngineering.org