In this project, you will model a clock that displays the current time. Your code will make the second hand, minute hand and hour hand rotate properly and keep track of time.
To build a clock, you will need to figure out how many degrees the second hand must turn every second. How should the minute hand rotate every minute? From one hour to the next, how many degrees must the hour hand rotate?
This starter file gives you three sprites with costumes for the second, minute and hour hands. The red second hand also contains a sound file for “clock ticking”.
You may find these blocks useful while writing the code for the second hand.
Time sensors in Sensing Menu will report the actual current time. For example when the current time is 10:45:20 these blocks will report:
Try, on your own, to write code for each sprite, telling it where to point at the current time. Look at these hints for Build Your Own Clock only if you are really stuck.
On most clocks with hands, the hour hand moves continuously rather than jumping all at once at each new hour? For example, the hour hand points between 12 and 1 when the time is 12:26:36. If your hour hand jumps from hour to hour, adjust your code to implement this more realistic movement.
Choose or draw costumes for the hands and clock to build a designer’s clock/watch in your own style. You can draw images, or find them on the web and use an image editing software such as Adobe Photoshop to edit and properly orient them. You will need to anchor the costumes properly by setting the rotation center at the appropriate point.
Create an alarm clock that takes some input from the user and beeps or rings when the time is up. To store the user input, you will need to learn how to make a variable using the Variables menu.
Build a “Grandfather Clock” with a swinging pendulum in its mechanism. Or a “Cuckoo Clock” that has an animated bird that shows up at regular intervals.