Project #1

The first invention we'll be building with the Annoyatron is a 'ticking' sound that people will think is coming from a clock. This is an especially good prank to try in rooms that don't have a clock - people will get super-confused as they try to work out where the sound is coming from!

 5 mins  
Difficulty: Super-easy!

 Make sure to watch this video before starting

The Kit

What you’ll need

Computer

Brain Board

Buzzer

USB Cable

Person to prank

Have you installed the coding software?

You’ll need to download the Arduino software to be able to code your invention. But don’t worry – click here for instructions.

This project only works in certain browsers.

Internet Explorer & Microsoft Edge will not work with this project.

Step 1

Let’s build this!

Watch assembly video

01. Connect the buzzer

02. Plug in the USB cable

03. Connect to your computer

Step 2

Set up your computer

01. Find and open the ‘Arduino’ application

You should have already downloaded and installed this earlier. The app is used to send computer ‘code’, or instructions, to the Brain Board for each invention.

02. Select your board

Open the ‘Tools’ menu and select the option that says ‘Arduino/Genuino Uno’.

Important!

Make sure you do this every time you connect the Brain Board to a computer.

Always select your Arduino board before uploading a program

Step 3

Choose your level of coding.

Text coding

For ages 10+

Block Coding

For ages 8-10

Code some chaos

Text-based coding

01. Copy and paste the sample code

The box to the right contains some sample code. Use your cursor to select everything in this box, right click, and select ‘Copy’. Switch to the coding application and delete any text already there. Right click and select ‘Paste’ to insert the sample code.

// which pin the buzzer is connected to
int buzzer = 11;

// code in here runs only once
void setup() {
  // set the buzzer as an output
  pinMode(11, OUTPUT);

}

// the loop runs over and over again forever
void loop() {
  //put your code here
}

02. Look for the ‘setup’ and the ‘loop’

In the sample code you just copied, you should see a setup and a loop section. We’re going to focus on the loop section, because code in here will repeat over and over again. This means that once we make a ticking sound, it will go on forever and ever.

03. Let’s add some code

Now we’re going to write some code inside the loop. These instructions will be executed line-by-line, from top to bottom. Replace the line that says “put your code here” with the code to the right. Don’t forget the curly brace on the last line.

  digitalWrite(buzzer, HIGH);
  delay(1);
  digitalWrite(buzzer, LOW);
  delay(1000);

04. Upload to the Brain Board

Wow! That was quick. You’re ready to test out your code. Click the upload button to send it to the Brain Board. The button is near the top of the window and has an arrow pointing to the right. You should now hear a ticking noise.

05. How does this all work?

DigitalWrite is used to turn things on or off, like a buzzer or a light. A delay pauses the program for a certain number of milliseconds. Because the instructions are read from top to bottom, this means that the code turns the buzzer on for 1 millisecond (a thousandth of a second) to make a short ‘tick’ sound, before turning off again for a second.

Did you know…

1000 milliseconds = 1 second. In computer coding, we often use milliseconds rather than seconds when talking about time.

Codespeak

HIGH turns things on, like a buzzer

LOW will turn things off

delay pauses the program for a certain number of milliseconds

Block Code Blitz

Block-based coding

Recommended for ages 8-10. Ages 10+ should use the text-based coding.

Codeables Studio is a cool new block-coding app that you can use with The Amazing Annoyatron. Watch the video to the left to find out how to code this program using the app.

Launch Codeables Studio

Link opens a blank project in a new tab.

Step 4

Make it more annoying!

Click on the boxes below to learn how you can wreak more havoc with your invention.

Chaotic coding

We’ll guide you through changing the code to make the project more annoying.

Connect to a battery

Learn how to connect your project to a 9V battery (not included).

3D Printed Case

Design your own 3D printed case for this project or use one of ours.

See it in action

Get some cool ideas on how you can use this project.

Change the sound of the tick

01. Find the ‘delay’

Take a look at line 14 in the code. This is a delay – a short break between the instruction that comes before it and the line of code after it. Here, the buzzer turns on for just one millisecond before turning off again – that’s because the tick of a clock is short and sharp. However, short and sharp is a little boring. Let’s increase this value to make it a little more like a ‘beep’, or a ‘yeeeeeep’!

delay(1); // wait a millisecond

02. Make it loud. Make it annoying.

Try a few different numbers in the brackets to see what new sounds you can create. Make sure to write down your favourite one and save it in your program! Start off by trying 10, then 50, and then 100. Here’s an example of a line of code you could try:

    delay(10); // wait for 10 milliseconds

The time between each tick

01. Find the other ‘delay’

Another thing that we can change in our program is the time between each tick (or beep!). This is done by changing the number in the brackets on line 16. Again, we are using a delay to pause the program for a set amount of time.

    delay(1000); // wait for a second

02. Change the value in the brackets

Try a few different numbers in the brackets to see what new sounds you can create. Make sure to write down your favourite one and save it in your program! Start off by trying 10, then 50, and then 100. Here’s an example of a line of code you could try:

        delay(3000); // wait for three seconds

Connect your project to a battery

Once you’ve finished building and programming your Annoyatron project, you can connect it to a battery and take it with you. Make sure that you have disconnected the board from the computer using the blue USB cable and instead connect the included battery clip. You will also need a 9V battery (not included in the kit) to connect to the other end of the cable.

Warning!

Never connect the Brain Board with the USB cable and a 9V battery at the same time.

3D print a case for the Annoyatron

Pimp your Annoyatron with this new case that you can 3D print in any colour! Feeling adventurous? Open the STL files in your favourite CAD program and really make them your own.

This case holds the included UNO R3 board and has slots for a buzzer, wires, power and USB.

Download now
Design and make your own 3D printed case for The Amazing Annoyatron

Sweet ideas for 'ticking' everyone off!

Let’s have some fun! Here are some cool tips, tricks and ideas for using this invention.

Help someone get a good night’s sleep

What about putting your invention near someone’s pillow? They’ll get a real surprise when they try to get to sleep.

It’s a gift from above. Or maybe not.

We used some blue-tack and a ladder (make sure you have a parent around if you use one) to stick our Annoyatron behind one of the lights in the roof. It’s well hidden and will have people very confused.

This will really tick them off

Digital clocks don’t tick, do they? This one’s sure to have most people confused. Just make sure that you hide your Annoyatron better than we did.

Share your creations with us on Instagram!

We love to see what people are making with the Annoyatron. Snap a pic and share it on Instagram with the hashtag #Amazing Annoyatron!

Aaaaargh!?! Where is that noise coming from?

Try hiding your Annoyatron in a drawer full of paperwork! This ticking sound is especially annoying when you’re trying to get some work done.

Finished this invention? Start the next project.

Next Project

Alarm & Flashing Light

How do I actually make this thing stop?

1

Create a new document in Arduino

Open the Arduino software and select File > New in the menu or use the keyboard shortcut Ctrl + N to create a new document.
2

Upload the program to your board

Make sure that the correct board is selected in the tools menu and then click the upload button to send the 'blank' program to the board, overwriting the current one.