Graphing with Finch

Learn how to graph the value of a sensor over time.

Lesson Level

Intermediate I

Created By

This activity was created by Dianne O'Grady-Cunniff of Charles County Public Schools.

Programming Language





6-8, 9-12

Free Teacher Materials

Get Access


This project is aligned with Common Core math standards that involve arithmetic and algebraic expressions (5.OA.A, 6.EE.A, and 7.EE.B); proportions (6.RP.A and 7.RP.A); and the coordinate grid (5.G.A and 6.NS.C). At the high school level, this activity enables students to summarize, represent, and interpret data (HSS.ID.A and HSS.ID.B).

You have learned to use the Finch sensors to move a sprite on the screen. In this activity, you will use the commands on the Pen menu to graph the value of a sensor over time.

Start by writing a program that uses the block below to move the sprite on the screen. What numbers do you need to put in the blanks so that the sprite moves all the way to the top and the bottom of the screen

Now you want to record the path of the sprite on the screen. Explore the commands under the Pen menu. Start with the pen down block; you can think about this block as placing a pen on the “paper” of the screen. How can you change the color of the sprite’s path?

You have a program that tracks the value of the light sensor. To create a graph, you need to start with the sprite on the left side of the screen and gradually increase the x-coordinate as you change the y-coordinate. At the very beginning of your script, add a command that will make the sprite start at (-240, 0).

Within your loop, add a block that will increase the value of the x-coordinate by one pixel each time through the loop. When you run your program, you should see a graph that looks something like the one shown below.

Extension: Can you add axes to your graph? Can you graph the light value for exactly 30 seconds?