Back to activities
Grades 2-5
2, 3, 4, 5
Grades 6-8
6, 7, 8

Photon Education

A program to help dividing students into groups

social development
Programming interface:
Photon Blocks
Back to activities
Scenario Image

Required items:

  • Tablet

Lesson scenario:

The main objective is to create a program that helps to divide students in a class into several groups. When touched, the robot has to change the color of its eyes and ears at random (from a given selection of colors). The children should come up in turns and touch the robot. A randomly drawn color indicates a group assignment.

1. First, determine the number of required groups and assign them colors, e.g.

  • group 1 - red
  • group 2 - blue
  • group 3 - orange
  • group 4 - green

2. In preparation time for your class, create the following program:


  • The “Wait” block is located in the sensors section.
  • To set up a random color change, select the dice icon, then choose the colors to be included in the draw.
  • To make sure the program does not stop drawing colors, but only when you turn it off yourself, use a loop function (“Repeat” block + the infinity symbol). If you choose not to add this block to your program, you will have to restart the program manually each time for every student.
  • At the end of the sequence, you might want to add the “Wait 3 seconds” block - that’s how long the drawn color will stay on, then add the ears color change function (make them black) — this way, the robot’s ears will fade out to inform you that the robot is ready for the next draw.


Prior to the draw, determine the number of students required in each group. The program will draw indefinitely, so one color may come up more often than others. When a specific group is full (because one color comes up frequently) and it needs no more participants, you can either update the program (deselect a particular color) or simply ask the child to touch the robot again until an available group (color) is drawn.


Discussion (No comments)

Log in to start a discussion