Game 1 - The Impossible Prize

This house has an opening where the visitor can reach inside to grab a piece of candy on a small table. The candy is even  lit up with an LED ring to make it tempting!  But, a PING))) sensor detects the visitor’s hand, and a servo flips down a bunch of hidden pipe cleaners to tickle and scare the visitor. Plus, the candy is fully glued down so no there's treasure to claim here — except for the first secret passcode digit displayed on the 7-segment LED.

 

Build it

The front of the "Impossible Prize" minigame.

  • Cut an approximately "hand-sized" (or slightly larger) hole in a cardboard box
  • Attach pipe cleaners to the horn of a servo with hot glue.
  • Attach the servo with hot glue to the inside of the box, so that it can rotate the pipe cleaners across the hole opening, and also hide them when the box is not activated.
    • Remember to figure out the best way to position the servo before you glue anything down!
  • Place candy in the back of the box as a decoy, we hot glued ours down to prevent theft.
  • Cut a hole in the box for the LED ring, using the cardboard from the cut out to fill the middle of the ring, and attach it with hot glue.
    • If you dont have a NeoPixel Ring or do not want to solder, you can use several regular LEDs and wire them to the breadboard using extension wires. Or, you can leave the LEDs out entirely.
  • Attach a PING sensor in the top of the box with hot glue (or use screws/nuts if you want something less permanent), situated above the location where a hand would first enter the box.
  • Measure the distance from the sensor to the bottom of the box, either using a ruler or getting a reading from the sensor
  • Cut a small rectangle out of the front of the box that is the size and shape of your 7- segment LED, fix the 7-segment LED into the hole and hot glue it in place.

 

Wiring it:

  • You will be using the ImpossiblePrize SVG file for this part of the project. It was included in the code download at the beginning of this megaproject.

Propeller I/O Pin Connections:

  • P0-P7 - Seven-segment LED
  • P14 - PING))) Sensor
  • P15 - LED Ring
  • P17 - Servo

7-segment LED schematic.

Servo schematic.PING))) schematic.

Note: It is best to run projects from a battery pack or wall supply, Do not try to run them off of the USB cable.

  • For the hand tickler, it is necessary to calibrate the distance for the PING))) sensor, everything else requires no action to activate besides inserting a hand.
  • You may need to change the control of the 7-segment LEDs because of wiring differences. Refer to the 7-Segment tutorial on how to wire this circuit. This LED needs to display the number 3.