# Modeling an Analogue Clock in Scratch

Posted by teachontario.team in Coding & Computational Thinking in the Classroom on Feb 2, 2018 2:54:58 PM

*Click here to return to Coding Hub Main Page*

One of the most exciting parts of my day as a resource teacher and co-teacher is to spend time with students who are in the midst of thinking through a problem and figuring something out.

One of the most effective thinking and learning environments is MIT’s **Scratch** environment. Late last fall, I was working with students in a grade 8 class. Some of them were taking on the challenge of building a working analogue clock in Scratch. Others were figuring out multiple methods by which circles and disks could be drawn in Scratch.

I kept checking in with various students but in this post I am specifically highlighting two students working together (as they... ** **worked together to model an analogue clock). I kept detailed (digital) notes of my observations and conversations with students about their projects.

One of the girls in the partnership decided to start by finding a blank clock face image in Google images. It was imported as the first sprite in the project.

She then started to look for clock hands in Google. When I returned to them, the other girl was drawing a red second hand in the sprite painting tool. They had decided to just draw the hands. At this point, I started a conversation with them and mentioned the significance of the small + symbol in the paint canvas. I reminded them that any transformations controlled by the dark blue (motion) blocks would use that point as the centre point. We also talked a little bit about how the hands move on an analogue clock.

They started to code the second hand and, logically enough, used the point in direction block. For the value of that direction, they knew about the light blue sensing blocks that contained values for time and date (i.e., current ______ ).

I knew at this point that the girls were about to face their first big issue. They assumed that the point in direction block along with the current second block would result in their second hand sprite pointing to the correct second. It didn’t.

Their thinking was logical but their understanding of exactly what the blocks were controlling and how was incomplete. The girls knew it wasn’t right because the second hand would jump back to the 9 and start slowly turning clockwise.

I reminded them that the value of the current second block could be displayed on the stage if they checked the box. Seeing this value is important information and it’s helpful to watch it change in real time (no pun intended!).

It wasn’t until the arrow sprite returned to the 9 again, and they saw the ‘current second’ value start at zero again, that they started talking about some ideas. I noted that they had a look at the help for the point in direction block.

One of the girls had an insight. She said out loud that they should first try to get the arrow pointing straight up at the 12 when the second was at zero. There were a few ways they could do this. They chose a mathematical way:

Adding 90 to the value worked perfectly well at accomplishing one thing: pointing at 12 when the value of ‘current second’ equaled zero. For the rest of the this session they experimented with more values in what looked to be almost a purely trial and error strategy.

They were trying to get the second hand to point to the right second. No lesson I could ever design in advance would have set them up better for an exercise in proportional reasoning than this project, a project they started, owned, and designed.

But now, here I was at the most crucial juncture of my role in their project. They needed to make a connection to other mathematical concepts about circles and angles. My idea was to invite them to tell me all about the clock face circle. I asked them to describe it mathematically:

- How many numbers were there?
- How many tick marks?
- How many seconds and minutes in one full circle sweep of the hand?
- What are the angles of the numbers and angles of the the tick marks?

For these girls, at this point in their thinking, making the connection again that there were 60 seconds in a minute and that there were 60 ticks around the circle... saying this out loud led to a key question: ‘what is the angle between each tick mark?’

360 divided into 60 equal parts equals 6.

So the 60 tick marks are each 6 degrees of the total circle.

Now their goal was to make sure this multiplicative relationship between Scratch’s current second, and the 6 degrees between each tick of the clock face, was reflected in the code. The trickiest part was making sure that the 90 degree rotation correction was added after the proportion was calculated.

This is real thinking, powerful learning, and immersive mathematics, using the sprites and blocks in Scratch as objects to think with. Making a highly accurate model of an analogue clock in Scratch is quite challenging and there are many small mathematical problems that need careful consideration and thinking through.

It is also important to mention that I consistently see all of the mathematical processes (as listed in the Ontario math curriculum document) in action every time when I observe students working in Scratch.

You can read connect with Jim on Twitter or learn more about his work on his blog: https://makelearn.org/

**Bio**: *Jim currently works in the Peel District School Board as a modern learning resource teacher. He is also a father, maker, learner, coder, blogger, musician, podcaster, and is always interested in sharing ideas and innovations to help young people develop as creative thinkers, doers and makers.*

## Comments