The Amazing Annoyatron

0 of 20 lessons complete (0%)

Definitely Not Music

You know what music is, right? Well, we can guarantee that this is NOT it. We don’t want to spoil the surprise, but this one’s really, really annoying.

Parts list

What you’ll need

Brain Board
Brain Board
USB Cable
USB Cable

Step 1

Let’s build this

Ticking Clock 2

This is the positive leg of the buzzer. It will have a ‘+’ over top and will also be longer than the other leg.

Don’t forget to plug the board into your computer with the supplied USB cable.



The +LEG is the longer leg.

+ LEG11

Step 2

Code some chaos

Don’t forget to select your port, like usual

Copy and paste the sample code

int buzzer = 11;

void setup() {
  // put your setup code here, to run once:
  pinMode(buzzer, OUTPUT);

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(buzzer, random(2));

Upload the code and test it out

Step 3

Modify the madness

Fiddle with the noise

The code for this invention is short, but that’s a good thing. All the code does is randomly sets the buzzer to either off or on every 1 millisecond.


That’s what causes the racket you heard after you uploaded the code – it’s known as ‘white noise’.

Change the delay in line 11 to alter the sound of the noise. You can’t create a delay smaller than 1 millisecond, so you’ll have to try larger values.