A 21-year-old built a working replica of the Weasley clock from 'Harry Potter' and it's amazing

A student from Duke University used his computer science skills for the best purpose: to bring the Weasley clock from "Harry Potter" to life.

Advertisement
Harry Potter Weasley clock
Trey Bagley

For those who live under a rock and aren't familiar with "Harry Potter," the Weasley clock helps family matriarch Molly Weasley keep track of her seven children. The clock's hands will point to where her children are located at a given time.

Trey Bagley, with the help of Duke's innovation co-lab, made a real version of the clock as a Christmas gift for his parents. He shared a photo and the code he used to create the clock on imgur, and it's gone viral ever since.

Here's how it was made:

Advertisement

Bagley was interested in creating a real version of the clock because of his family's close connection to the "Harry Potter" series.


"It's always been a big family activity and something we could all do together, whether it was a midnight book or movie release or birthday parties," Bagley told Tech Insider. "It was a go-to [activity]."

Bagley has three sisters — two are in college, and the youngest is slated to move out soon, making his parents "soon to be empty nesters," Bagley said.

He figured the clock would tie everyone together even if they are in different physical locations.

Harry Potter clock 1400px
Trey Bagley

"We are all going our different ways, so this ties us all back to home and to this childhood interest and passion," he said.

Advertisement

Bagley got the idea to make the Weasley clock around Thanksgiving break and bought a broken clock from an antique store.

Harry Potter clock 1440 px
Trey Bagley

"I haggled down for it and couldn't go back — I had to see it through," he said.

First Bagley had to create the Weasley clock design, so he used a laser cutter to etch the design on the wood surface of the clock.

Harry Potter Weasley clock
Trey Bagley

A friend helped him draw the design out on Illustrator.

Advertisement

The Innovation Co-Lab at Duke taught Bagley how to use a Particle Photon, which allows you create connected projects.

Harry Potter clock
Trey Bagley

So Bagley used the Particle Photon in conjunction with an app called If This Then That.

Harry Potter clock
Trey Bagley
Advertisement

As you can see from the clock, there are six locations the family can fall under: home, work, holiday, forest, on the way, and mortal peril.

Harry Potter Weasley clock
Trey Bagley

Using the If This Then That app, Bagley and his family members could enter what the clock should read when a family member is in a specific location.

Harry Potter clock 1440 px
Trey Bagley

So if Bagley is in a certain radius of his dorm, his phone will send a message to the Particle Photon telling the clock to read as "home."

Advertisement

Bagley got creative with the mortal peril option of the clock.

Harry Potter clock 1440 px
Trey Bagley

Since he's working at Microsoft next year, the clock will read "mortal peril" if the stock drops below its three-year low.

His sister programmed her app to place her in "mortal peril" if the temperature is too cold.

Advertisement

Bagley made his code public in the hopes that other people will create their own version of the Weasley clock.

"I'm excited to see others unique takes on this," he said.

You can get the code here and his step-by-step instructions.

Harry Potter
Advertisement
Close icon Two crossed lines that form an 'X'. It indicates a way to close an interaction, or dismiss a notification.