I build a little gadget to prank my lovely wife. WARNING! THIS DRIVES PEOPLE NUTS! DON'T DO IT TO SOMEONE WHO IS LIKELY TO PUNCH YOU IN THE FACE.
Makes annoying beeps at random intervals. The random pitch and interval makes it very difficult to pin-point the source of the beeping. I might clean up the design and spin up a few circuit boards if anybody is interested in an easy build-along vid.
Thanks for your help! http://www.Patreon.com/AvE
Here's the code:
/*
Lil' BASTARD ZEN BLASTER
WARNING! THIS DRIVES PEOPLE NUTS! DON'T DO IT TO ANYBODY WHO IS LIKELY TO PUNCH YOU IN THE FACE.
Makes annoying beeps at random intervals. The random pitch and interval makes it very difficult to pin-point the source of the beeping.

*/
const int speaker = P1_7; // this sets the pin on the MSP430 that sends a beep to the speaker.
int duration = 1000; // this is a variable that stores the value of length of the tone
int frequency = 600; // this is a variable that stores the value of the frequency of the tone
int counter = 0; // this is a variable that stores the value of how many times we've run thru the void loop
int trigger = 1; // this is a variable that stores how many times we run thru the void loop prior to triggering a beep sequence
int beeps = 2; // this is a variable that stores how many beeps in a sequence

// the setup routine runs once when you press reset:
void setup() {

tone(P1_7, 2500, 800);
delay (200);
tone(P1_7, 500, 800);
delay (200);
tone(P1_7, 2500, 800);
delay (200);
// this runs through a few tones when you first start to let you know it's working.

}
// the loop routine runs over and over again forever:
void loop() {

counter = counter ++; // each time through the program, we add 1 to the value of counter
if ( trigger == counter && beeps == 2) { // if the trigger value and the counter value are equal AND the beep value is 2 then do this:
counter = 0; // resets the counter value to zero
beeps = random (2, 5); // sets the number of beeps for the next time

trigger = random (500, 5000); // sets the length of time before the next series of beeps
duration = random (200, 2000); // sets the length of time for each beep in milliseconds
frequency = random (2500, 6000); // sets the frequency in Hertz of the square wave signal to the speaker
tone (speaker, frequency, duration); // sends a beep square wave signal to the speaker according to the values of frequency and duration
delay (duration/2); // sets a short delay pause to allow the beep prior to executing the next command
duration = random (400, 1500);
frequency = random (300, 4000);
tone (speaker, frequency, duration);
delay (duration/2);
}
if ( trigger == counter && beeps == 3) {
counter = 0;
beeps = random (2, 5);
trigger = random (500, 5000);
duration = random (200, 2000);
frequency = random (2500, 6000);
tone (speaker, frequency, duration);
delay (duration/2);
duration = random (500, 2000);
frequency = random (300, 1500);
tone (speaker, frequency, duration);
delay (duration/2);
duration = random (1500, 2000);
frequency = random (300, 3000);
tone (speaker, frequency, duration);
delay (duration/2);
}
Continued in comments. (it's too long for description).

By AvvE

16 thoughts on “Zen blaster a most annoying diy electronic device”
  1. Avataaar/Circle Created with python_avatars Matt Harrington says:

    if someone builds me one, i will pay them. junkie deterrent needed. pls reach out directly

  2. Avataaar/Circle Created with python_avatars Harvester says:

    How can i scale this up for a car horn and a 12v battery?

  3. Avataaar/Circle Created with python_avatars billybbob18 says:

    There's a street sign near me that says AvE; Avenue E. Someone should steal that for you. lol
    BTW. You never need to buy LM7805 volt regulators. They can be found in anything that plugs into the wall and has a microchip….everything.

  4. Avataaar/Circle Created with python_avatars AB says:

    counter = counter ++; could just be counter++;

    Just FYI

  5. Avataaar/Circle Created with python_avatars Yamato Damashii says:

    Your wife seems to be applying the principle of parsimony to the situation or in this case correlation does imply causation.

  6. Avataaar/Circle Created with python_avatars thederrick1966 says:

    i need one of those.. my boy loves things to annoy his mommy .. he has the screaming goat the farting machine and some others this would top his little collection lol

  7. Avataaar/Circle Created with python_avatars Mário Garrido says:

    Awesome project! Atrocious code xD no need for the counte ++ and the if

  8. Avataaar/Circle Created with python_avatars thederrick1966 says:

    I need one bad to torture my ole lady

  9. Avataaar/Circle Created with python_avatars David Leger says:

    You should install it inside the case of someone elses PC
    It'll drive nuts trying fix their fucking Windoz….. Lol…

  10. Avataaar/Circle Created with python_avatars Indy says:

    Oh hell ya. Getter done.

  11. Avataaar/Circle Created with python_avatars J says:

    A rec: put a thin glass bowl over it so that it's just baaarely audible from the proper angles.

  12. Avataaar/Circle Created with python_avatars Ken Purcell says:

    Made a beeper back in 1982 from discrete components and put I it my HS locker. Dumb move, put it someone else's locker!

  13. Avataaar/Circle Created with python_avatars Jason Yates says:

    Lmao, simply golden. What beeping?

  14. Avataaar/Circle Created with python_avatars L. henry says:

    I modified your plans a little, got the damnest EMP device which goes off intermittently and shuts down all kind of shit in the neighbour. Good thing I am only visiting.

  15. Avataaar/Circle Created with python_avatars DeadNeck90 says:

    So did you ever do a detailed build of this bastard?

  16. Avataaar/Circle Created with python_avatars Curtis T says:

    Oh man i gotta build me one for the wify 😆

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.