The Pumpkin is built from the Lego Wedo 2.0 educational kit. As soon as you want to touch the pumpkin, the distance sensor triggers, a warning signal sounds and the pumpkin swings from side to side.
The set includes step-by-step building instruction and an example of program (in Lego Wedo 2.0 environment).