Mario the Magician's Magical Lapel Flower
Contributors:
Dia
Code
This is the code that you'll want to upload to your Pro Mini to perform Mario's routine! Remeber to select the correct board (SparkFun Pro Micro 16MHz/5V) and the correct serial port. If you haven't done so already, follow the installation instructions found in the Pro Micro Quickstart
language:c
#include <Servo.h>
///////COMEDY FLOWER BY: MARIO THE MAGICIAN///////////////////
////////MARCH 2013 www.mariothemagician.com //////////////////////
/////////////////////////////////////////////////////////
Servo Flower;
////////////////////////////////////////////////////
void setup()
{
Flower.attach(10);
}
void loop()
{
Flower.write(0); // Flower Wilted :(
////////////////////Flower///////////////////////////////////
///////////////////PHASE 1 ////////////////////////////////////
delay(8000); // You have 5 seconds to yell at the flower to rise, then
// Look away and scream at yourself for the flower not working
Flower.write(180); // Flower has Risen!
delay(500); // wait
Flower.write(0); // Flower Wilted :(
delay(500); // wait
Flower.write(180); // Flower has Risen!
delay(500); // wait
Flower.write(0); // Flower Wilted :(
///////////////////////////////////////////////////////////////////////
//////////////////flower///////////////////////////////////
///////////////////PHASE 2///////////////////////////////////
delay(8000); // here you explain you can make the flower rise by the power of
/////////////// of your mind. Wiggle finger underneath while humming and the
/////////////// the flower slowly roboticly rises.
Flower.write(10);
delay(200);
Flower.write(20);
delay(200);
Flower.write(30);
delay(200);
Flower.write(40);
delay(200);
Flower.write(50);
delay(200);
Flower.write(60);
delay(200);
Flower.write(70);
delay(200);
Flower.write(80);
delay(200);
Flower.write(90);
delay(200);
Flower.write(100);
delay(200);
Flower.write(110);
delay(200);
Flower.write(120);
delay(200);
Flower.write(130);
delay(200);
Flower.write(140);
delay(200);
Flower.write(150);
delay(200);
Flower.write(160);
delay(200);
Flower.write(170);
delay(200);
Flower.write(180);
delay(3000); /// Now make a high pitch sound and wiggle your fingers
Flower.write(170);
delay(200);
Flower.write(160);
delay(200);
Flower.write(150);
delay(200);
Flower.write(140);
delay(200);
Flower.write(130);
delay(200);
Flower.write(120);
delay(200);
Flower.write(110);
delay(200);
Flower.write(100);
delay(200);
Flower.write(90);
delay(200);
Flower.write(80);
delay(200);
Flower.write(70);
delay(200);
Flower.write(60);
delay(200);
Flower.write(50);
delay(200);
Flower.write(40);
delay(200);
Flower.write(30);
delay(200);
Flower.write(20);
delay(200);
Flower.write(10);
delay(200);
Flower.write(0);
///////////////////////////////////////////////////////////////////////////
delay(1000);
Flower.write(180); // Flower has Risen :)
/////////////////Flower//////////////////////////////////////////////////
////////////////////PHASE 3 ///////////////////////////////////////////
delay(6000); // Explain that you can blow on the flower to make it wilt again
/////////////Blow once nothing happens. Blow twice nothing happens
////////////Breathe in and hold it till the flower wilts. look at it
///////////shrug your shoulders and say HUH!
Flower.write(0); // Flower Wilted :(
delay(50000);
}
////////////////////////////////////////////////THE END/////////////////////////////////////////////////////////////////////////////////////