Adam Thomas
Professor, Media Studies and IT�Faculty of Media and Creative Arts�MA Learning and Technology�adam.thomas@humber.ca�codeadam.ca
Weasley's Hat
Diagon Alley
Weasley’s Wizard Wheezes�Set #75978
The LEGO Group. (n.d.). Diagon Alley™. Retrieved 2022, from https://www.lego.com/en-ca/product/diagon-alley-75978.
Module Description
Weasley’s hat from the Diagon Alley set already has a lever to tip his hat manually. This module will tip his hat automatically every ten seconds.
The LEGO Group. (n.d.). Diagon Alley™. Retrieved 2022, from https://www.lego.com/en-ca/product/diagon-alley-75978.
Sensors and Motors
The only output port will be attached to an EV3 servo motor.
Ports
Weasley’s hat will require one output port on an EV3 hub to connect a motor.
Variables/Settings
Status: Can be set to "on" or "off". When on Weasley’s hap will tip every ten minutes.
Interval can be changed.
IOT Loop
While True� � If status == "on"�� If counter == 0� Start motor slow clockwise�� Else If counter == 10� Stop motor�� Else If counter == 50� Start motor slow counter-clockwise�� Else If counter == 60� Stop motor
The LEGO Group. (n.d.). Diagon Alley™. Retrieved 2022, from https://www.lego.com/en-ca/product/diagon-alley-75978.