Project #2

Alarm & Flashing Light

Who doesn’t thoroughly enjoy annoying people with annoying alarm noises? Well, this invention makes things even better, as it has a light as well! This is the perfect project for annoying just about anyone, especially your least-favourite librarian.

Start by watching this video

The alarm and flashing light is sure to cause a frenzy of chaos amongst your friends and family!

The Kit

What you’ll need


Brain Board


USB Cable

Colour LED

3 x Coloured wires

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.

How to connect the parts

To wire up this project, you’ll need the Brain Board, USB cable, buzzer, RGB LED and 3 wires. To connect your buzzer, slide its pins into the Arduino board as shown – the positive leg should go in PIN 11 and the negative leg should go in GND. The longest pin of the RGB LED is the ‘negative’ pin, and this needs to be connected to GND on the board using a wire. The LED’s other legs can be connected to the board’s pins using two more wires as shown in the diagram below.

When wiring up your RGB LED, you can use different coloured wires to those in the diagram below. The project will still operate the same.

Hover over the PLUS signs for extra tips

Alarm & Flashing Light
This is the positive leg of the buzzer. It will have a ‘+’ sign on top of it and will also be longer than the other leg.
Don’t forget to plug the board into your computer with the included USB cable.
Apart from the ‘negative’ pin which has a black wire attached, you can tell the difference between all the other pins by the colour of wire attached.
The longest leg of the LED is the ‘negative’ pin and needs to be connected to GND.

Step 2

Our sample code

You’ll see what this is for in just a moment

int buzzer = 11;
int redPin = 3;
int bluePin = 5;

int beepLength = 500;

void setup() {
  pinMode(buzzer, OUTPUT);
  pinMode(redPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
} // close setup

void loop() {
  analogWrite(buzzer, 255);
  analogWrite(redPin, 50);
  analogWrite(bluePin, 0);
  analogWrite(buzzer, 0);
  analogWrite(bluePin, 50);
  analogWrite(redPin, 0);

Step 3

Let’s start coding

Like with previous projects, you’ll need to add and upload the sample code to your Arduino board to get it to work. Forgotten how to do this? Click on the titles below to expand the instructions for each step of the process.

Forgotten how to do these steps? Click on the titles to expand.

Connecting & setting up your Arduino board

1. Connect to your computer

The Amazing Annoyatron kit includes a mini computer that you can send code (instructions) to, called an ‘EduKits UNO’ board. We might also call it an ‘Arduino’ board because this is the program that we program it with. Start by connecting this board to your computer using the supplied USB cable. This will give the board power and will allow it to ‘talk’ to your computer. If the cable is connected correctly, you will see small lights flashing on the board.

Always select your Arduino board before uploading a program

2. Select your board

Every time you open the Arduino software, make sure that you select the option that says ‘Arduino/Genuino Uno’ from the ‘Tools’ menu.

Creating and saving a new 'code' document

Like in other programs you may have used like Microsoft Word, we need to create a new document to work in whenever we start something new. First launch the Arduino software that you downloaded earlier (if you didn’t, learn how to here) and select File > New in the menu at the top of the window.

You’ll notice that a new window will have popped up. It already contains some code, but we need to delete this because you will be pasting in some sample code that EduKits has written already. Select all the code using your cursor and then hit the ‘delete’ key on your keyboard to clear the existing code.

Next, select File > Save and give your project a name to save it to your account. This makes saving your work easier for later on.

Now you’re ready to upload the sample code!

Adding and uploading the sample code

Delete the existing code, then copy and past the code from our website. You can then upload the program to your board.

1. Add the sample code

We’re going to start off with some sample code, just so that you can see exactly what the project does. You can find this by scrolling down the page to section ’02’. Copy and paste the code from here into the blank program in the Arduino software.

2. Upload the program

Now that you’ve got your code, you can send it to your Arduino board. Find the button with a right arrow on it and click it to upload. If you haven’t already saved your document, a window will then pop up prompting you to do so. Type in a name like ‘Ticking Clock’ and then hit okay.

The program will ‘think’ for a moment, and then you will see lights flashing on the board very quickly for a few seconds before turning off. This means that the program has now been uploaded.

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 volume level of the alarm

For once, this change isn’t all that exciting. Since the volume of the alarm is already maxed out, the only way the volume can be changed is by bringing it down. But still, if the beeping is a little too loud, then this might be helpful. Line 14 is where the buzzer’s volume is set. Let’s take a look.

analogWrite(buzzer, 255);

The volume here is set with a value anywhere between 0 and 255, where 0 is completely off and 255 is maximum volume. Try a few different values to see what they do to the program.

Change how long each beep goes for

In line 5, you can see that we have set ‘beepLength’ to equal ‘500’. This is what’s called a variable, but more on that later. Changing this number will alter the length and space between each beep.

int beepLength = 500;

The beepLength is used in the program to control the amount of time that the beep stays on for and also the time that it is off for. This is done with a delay on lines 17 and 21 of the code.


You always have to use a number for a delay to work properly, but because beepLength was given a number (500) earlier on in the code, that is how many milliseconds the delay will go for.

What is cool is that when we change beepLength in line 5 of the code to something else, like 750, the delay time on lines 17 and 21 will change to 750 milliseconds with it.

How do I make this thing stop?!?

Click here to find out how to clear the program and make that super-annoying sound finally stop.

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.


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

Where you could use an annoying noise...

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

Broken Night Light

How do I actually make this thing stop?


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.

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.