Scratch 101: Creating an Analog Clock

Hello and welcome to Scratch 101! In this tutorial we will be creating an analog clock, which is the classic type of clock found on the wall! If you are new to this display, you can learn here how to read an analog clock. 

Finished Product:

Graphical Setup:
You can find the graphical template here: https://scratch.mit.edu/projects/141448536/

Scripts:
Hour Hand:


 Minute Hand:














 Seconds Hand:


Common Mistakes:
Make sure to organize your scripts correctly! Make sure not to confuse the operations. Order of operations is important, otherwise your clock will not function properly.

Make sure that you put the correct pieces of code in the correct hands, otherwise it will not look the same as the completed version. 

If you find yourself having a problem getting the order of operations, build the script from the block at the back all the way up to the first block in the sequence!

Challenge:
Try and create some extra features for this clock. Have it display the day, month and year using variables. Make sure to check off the checkboxes next to the variables so that they appear on your screen! 

The completed version can be found here: https://scratch.mit.edu/projects/141444786/

5 comments:

  1. FYI, I made an analog clock without using this tutorial, and I can tell you that the scripts for determining the direction of the hands don't have to be so complex. For the hour hand, the equation I used is [({current hour}*30)+90)], the minute hand is [({current minute}*6)+90)], and the second hand is [({current second}*6)+90)]. Just thought I'd let you know :)

    ReplyDelete
    Replies
    1. Thanks! I could use these for a possibly tutorial in the future. :)

      Delete
    2. JUST A BIT MORE INFOO: The scripts I put are just the bare bones. The hour hand will turn once every hour, and the minute hand once every minute. Not like yours.

      Delete
    3. That's good to know :)! Thanks once more.

      Delete
  2. This is so helpful, thanks
    And also i did a perfect clock with pen text engine, that can draw the time

    ReplyDelete