Project showcase

Motion-Triggered Confetti Cannon © GPL3+

Confetti everywhere! Who doesn't love confetti? (um...everyone?) Place the cannon in a strategic place and surprise your friends passing by!

  • 2,741 views
  • 0 comments
  • 16 respects

Components and supplies

Necessary tools and machines

3drag
3D Printer (generic)
Before 3D printing the cannon, make sure that your spring will fit inside. You may need to make adjustments according to the equipment you have or purchased for the project.

Apps and online services

circuito.io
Click on the link to go to the pre-defined parts selection for this project on circuito.io
Ide web
Arduino IDE

About this project

Confetti everywhere! April Fool's Day and Arduino Day call for a celebration!

The confetti cannon fires whenever it detects movement.

Click on this magic link to circuito.io, and you will see the parts for the project are already selected for you on circuito.io.

1. Click on Generate at the button of the page on circuito.io

2. Assemble the circuit and upload the sample code you got to your Arduino

3. Replace the test code with the specific code for the project, at the bottom of this project page.

And go have some fun with your new toy :)

circuito.io's Arduino Day Prank Contest 2017

Code

confetti canon codeArduino
Connect the Arduino board to your computer and upload the code your received in the reply from circuito.io.
Once everything is running properly, replace the voide setup and void loop functions in the firmware tab of the original code, with the code below.
If you need any help, you are always welcome to contact us >> hello@circuito.io.
/* This code sets up the essentials for your circuit to work. It runs first every time your circuit is powered with electricity. */
void setup() {
    // Setup Serial which is useful for debugging
    // Use the Serial Monitor to view printed messages
    Serial.begin(9600);
    Serial.println("start");
    
    servo.attach(SERVO_PIN);
    servo.write(servoRestPosition);
    delay(100);
    servo.detach();
}

/* This code is the main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop. */
void loop() {
    
    
    
    
    if (pir.read())
    {
        // The servo will rotate to target position and back to resting position with an interval of 500 milliseconds (0.5 seconds) 
        servo.attach(SERVO_PIN);         // 1. attach the servo to correct pin to control it.
        servo.write(servoTargetPosition);  // 2. turns servo to target position. Modify target position by modifying the 'ServoTargetPosition' definition above.
        delay(500);                              // 3. waits 500 milliseconds (0.5 sec). change the value in the brackets (500) for a longer or shorter delay in milliseconds.
        servo.write(servoRestPosition);    // 4. turns servo back to rest position. Modify initial position by modifying the 'ServoRestPosition' definition above.
        delay(500);                              // 5. waits 500 milliseconds (0.5 sec). change the value in the brackets (500) for a longer or shorter delay in milliseconds.
        servo.detach();                    // 6. release the servo to conserve power. When detached the servo will NOT hold it's position under stress.
    }
    
}Binary file (no preview)

Custom parts and enclosures

confetti canon cad
Before 3D printing the cannon, make sure that your spring will fit inside. You may need to make adjustments according to the equipment you have or purchased for the project.
There are three parts you'll need to 3D print for the Confetti Cannon.
You may need to make adjustments so that the parts fit together properly.
launcher_ZRlKaYizMg.stl
spring_base_VkizTpgBEY.stl

Schematics

confetti canon schematics
diagram_(2)_YLnsVGx6Da.fzz

Comments

Similar projects you might like

Arduino Apple Watch

Project tutorial by Karlstrom

  • 17,165 views
  • 3 comments
  • 65 respects

Fish-O-Matic

Project showcase by Team The Fish-O-Matic team

  • 11,436 views
  • 3 comments
  • 70 respects

Talking Clock 2 - New Version (Bilingual: EN-PT)

Project tutorial by LAGSILVA

  • 7,350 views
  • 19 comments
  • 33 respects

RING PONG

Project showcase by aerodynamics

  • 5,332 views
  • 2 comments
  • 12 respects

'Roger Bot' the Pet Rover

Project showcase by hannu_hell

  • 1,697 views
  • 0 comments
  • 12 respects

Arduino Game By LCD

Project tutorial by Mohammed Magdy

  • 32,866 views
  • 31 comments
  • 108 respects
Add projectSign up / Login