Remote Control

Create a remote control for Phiro using Make a Block in Snap4Arduino to enable your computer's keypad arrow keys to make Phiro move.

Objective

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

  • Understand how remote controls work
  • Understand and create efficient code
  • Identify and use their own programming blocks
  • Use computational concepts 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, Remote Control.

Age

9 & above

Duration

40 min

Robot & Accessories Needed

Phiro Pro robot

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

Ask

How do remote controls work?

How do car wheels move when the car is driving in different directions?

How would you make a remote control from your computer keypad to control Phiro's wheels to move?

STEP 2

Imagine

Imagine what you would need in Snap and Phiro to solve this challenge.

Create conditions to connect Arrow Key to Phiro Direction. Example, If Up arrow is pressed, Phiro moves Forward.

How many steps would it take to change Phiro's directions? 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

STEP 3

Plan

Explore how Phiro's motors turn when moving forward, backward, turn right & left. Plan the conditions to incorporate the computer's key arrows to each of Phiro's movements.

STEP 4

Create

Create Phiro's remote control program

1. Make a Block

2. Define the Block

3. Create remote control

  • Up = Forward
  • Down = Backward
  • Left = Turn Left
  • Right = Turn Right

Define the block with the given Input value speed - variable 'L' denotes speed.

Remote Control program

STEP 5

Remix

Remix your remote control to use Phiro's LEDs to flash different color lights for different directions!

STEP 6

Share

Share your very own Phiro Remote Control creation using #MyPhiro and we will share it with the world!