Light Show

Create a light show by programming Phiro to flash lights of different colors for 1 second each using Make a Block in Snap4Phiro.

Objective

By the end of this lesson, learners will be able to

  • Understand about programming LED lights
  • Understand and create efficient code
  • Identify and use their own programming blocks
  • Use computational concept of control
  • Connect digital and physical worlds
  • Develop greater fluency of sequence, control and debugging
  • Practice experimenting & iterating
  • Express their creativity by programming a robotic light show
Subjects

Robotics, Coding, Make a Block, Light Show

Age

9 & above

Duration

45 min

Robot & Accessories Needed

Phiro Pro robot

  • step1
  • step2
  • step3
  • step4
  • step5
  • step6
STEP 1

Ask

  • How many colors and combinations of colors can you imagine in a light show?
  • How many basic colors can be formed using RGB LED combinations?
  • (Hint: 16million!)
  • Playing around with mixing colors can makes an awesome light show!
  • How can you make Phiro flash as many color lights
STEP 2

Imagine

How would you program Phiro to flash different color lights?

How many steps would it take to change from 1 color to the next?

How would you imagine decreasing the number of steps to make the process more efficient?

2 ways to do this:

1. Long Code

2. Short Code

What colors will your light show have and will there be a face-off of Left and Right LEDs?

STEP 3

Plan

2 ways to create your lightshow

Long Code

1. Identify the Left and Right LEDs in front of Phiro robot

2. Explore Phiro's Left & Right LED blocks of different colors in Snap4Phiro

3. Explore the range of the LED block values 0 to 255

4. Figure out the blocks you need to program Phiro's right and left LED lights individually.

Short Code

1. Explore "Make a Block" blocks

2. What block can you make to simplify Phiro's flashing lights

STEP 4

Create

Create the Long Code and Short Code

Long Code:

1. Flash Right and Left LEDs RED only

2. Wait 1 Second

3. No Color = Black (K)

Short Code Steps

1. Make a Block

2. Define the Block

3. Flash RGBCMYK for 1 second each and repeat forever


Create a light show by programming Phiro in Snap4Phiro to flash lights of different colors for 1 second each.

Short Code

1. Phiro Flash both Red 1 Sec

2. Phiro Flash both Green 1 Sec

3. Phiro Flash both Blue 1 Sec

4. Phiro Flash both Cyan 1 Sec

5. Phiro Flash both Magenta 1 Sec

6. Phiro Flash both Yellow 1 Sec

7. Phiro Flash both White 1 Sec

8. Repeat Forever

STEP 5

Remix

Remix your light show code with Phiro Motor blocks and make Phiro to move in different directions along with Phiro Light Show code.

STEP 6

Share

Share your Phiro Light Show using #MyPhiro and @RobotixLS and we will share it with the world.