Phiro Alarm Clock

Create an alarm clock system by programming Phiro in Scratch to move forward and flash green light at the set alarm time.

Objective

By the end of this lesson learners will be able to

  • Identify and use computational concepts of Variables, Operators, Sensing, and Control, to create an alarm system
  • Connect the physical and digital worlds
  • Develop greater fluency of sequence and debugging
  • Practice experimenting & iterating
  • Express their creativity by programming a robotic alarm
Subjects

Robotics, Coding, Alarm Clock

Age

9 & above

Duration

30 min

Robot & Accessories Needed

Phiro Pro Robot

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

Ask

Think about how an alarm clock works.

How do clocks match current time to set alarm time?

How does the clock alert you when the alarm goes off?

How will you make Phiro wake you up?

What all do you need to make your Phiro alarm work?

STEP 2

Imagine

Imagine what you will need in Scratch code and Phiro, to solve this challenge.

1. Get Set Time from user

2. Compare computer device time to set time.

3. Make Phiro move + flash light.

STEP 3

Plan

Place your Phiro & computer on your bedside table to wake you up. Plan your virtual alarm system creation in 3 parts:

1. Get Set Time. Explore the Data block in Scratch to Make Variables for user to input time. Explore also the Sensing Ask & Current blocks to get time from user.


2. Compare device time to set time. Explore the Operator True block in Scratch, to compare current computer time and Set Time. In Sensing, explore the Current blocks for user set time.


3. Make Phiro move+flash light. Explore Phiro's move motor and LED blocks to flash lights.

STEP 4

Create

Create your virtual alarm clock system in 3 parts:

  • Get Set Time from user
  • Compare computer device time to set
  • Make Phiro move+flash light.

Test your code and watch if Phiro has followed your instructions. Did it do as expected? What did you do to improve your alarm?

STEP 5

Remix

Remix the program to add Snooze option, where users can give Snooze value in minutes. Phiro will keep continuing alarm after given Snooze time till the user turns off Phiro!

STEP 6

Share

Share your Phiro Virtual Alarm Clock using #MyPhiro and @RobotixLS and we will share it with the world.