Video Motion Security System

Create a video motion security system using Phiro and Scratch to make Phiro flash both green lights and turn right when movement is detected in front of the computer screen.

Objective

By the end of this lesson learners will be able to

  • Understand video motion detection
  • Identify and use computational concepts of Sensing, Control
  • Learn about video motion detection
  • Connect the physical and digital worlds
  • Develop greater fluency of sequence and debugging
  • Practice experimenting & iterating
  • Express their creativity by programming a robotic security system
Subjects

Robotics,Coding, Video Motion

Age

9 & above

Duration

40 min

Robot & Accessories Needed

Phiro Pro robot

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

ASK

Think about how a security system works.

How is movement detected and what is the warning sign?

How does a video motion detection with camera work?

How will you make the computer to alert Phiro to "warn" you when someone enters the room?

STEP 2

IMAGINE

Imagine what you will do in Scratch code and Phiro to solve this challenge

1. Check condition if computer camera detects movement.

2. If movement is detected, Phiro turns right and glows both green lights, waits & then stops.

STEP 3

PLAN

Plan your program in 4 chunks.

Make sure the computer screen faces the entrance of the room to detect movement.

Allow Flash on your computer to talk to the Web Camera on your computer.

  • Check condition if computer camera detects movement.
  • Explore Sensing Video Motion blocks in Scratch to select Motion on Sprite.
  • Make a program in Scratch to move Phiro forward according to Video motion value.
  • You can notice Phiro moves at low speed. How to modify above program so that Phiro moves at its maximum speed using video motion blocks?
STEP 4

Create

Create your Phiro video motion detection system in 2 parts:

  • Check condition if computer camera detects movement.
  • If movement is detected, Phiro turns right and glows both green lights, waits & then stops.


Test your Security System and watch if Phiro warns you as programmed when an intruder is detected!

STEP 5

Remix

Remix your Security System to make PHIRO turnaround in one direction and Change lights to other colors.

STEP 6

Share

Share your Phiro Video Motion Detection System using #MyPhiro and @RobotixLS and we will share it with the world.