Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • The Carnival Game Megaproject

The Carnival Game Megaproject

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

  • 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

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.

Printer-friendly version
Game 2 – The High Striker
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress