Kyle Cook
Published © GPL3+

Single Person Weasley Clock

An old-timey looking "clock" that tracks one person's location. Based off of the Weasley's clock in Harry Potter. Good first timer circuit.

BeginnerFull instructions provided3 hours592
Single Person Weasley Clock

Things used in this project

Hardware components

Particle Photon
EMax 12g ES08MD high Sensitive servo
Seeed Studio EMax 12g ES08MD high Sensitive servo
Phone Charger
To power the Particle Photon via a wall plug. (~5v/700-800mA is what I used)
Shadow Box
This houses everything. A deep picture frame will do as well. Any art & craft supply store should have these. There are also many online. You will likely need to drill or cut a hole to run your power cable through the back. Also, the box should be about 1.25" deep or more.
Jumper wires (generic)
Jumper wires (generic)

Software apps and online services

You will make the Applets on your computer on IFTTT's website. Also download the app on your phone for the location services to work. Be sure to link your IFTTT account to your Particle account or nothing will happen!
Particle Build Web IDE
Particle Build Web IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)


Read more

Custom parts and enclosures

Fritzing Circuit

Downloadable version.


Circuit Diagram

Made with Fritzing. (Please note the Photon also needs to be plugged into a power supply).


Weasley Clock Code

Simply copy and paste into your Particle Web IDE. The code is ready to go!
Servo userservo; // Intorduces the board to the servo
                // Max allowed: 8

int userpos = 0;    // Variable which will be the servo position

void setup()

//Tether the Servo to the function 
Particle.function("userservo", updateuserServo);
//Set pin D0 to be the output
pinMode(D0, OUTPUT);

//Activate Photon LED
//Turn off the LED - we don't want to see it through the clock - do this by setting RGB values to 0.
RGB.color(0, 0, 0);
void loop()
// Can leave this area blank - nothing to loop.
//This function is triggered by IFTTT - the 'command' word represents the object used to store the 'position' we send to the function.
//The 'position' we send represents where we want the servo to move to
int updateuserServo(String command)
//Attach the servo to D0

//Convert string to integer, the code after this requires the 'command' object to be in a number format. IFTTT however passes the object as a 'string' even if it is a 'number'.
uint8_t userpos = command.toInt();

//This tells the servo, attached to D0 to move to the position defined in the 'command' object that was passed when we triggered this function from IFTTT

//Flash the LED on so we can see that a signal has been recieved.
RGB.color(0, 0, 255);

//Adding delay makes the light visible for 2 seconds.

//Now set the LED back to off
RGB.color(0, 0, 0);

//detach the servo

//We return something to signify the end of the function - doesn't really matter what it is
return 1;



Kyle Cook

Kyle Cook

2 projects • 0 followers
Thanks to Tim Tiernan.


Add projectSign up / Login