Simple Mac Prank Using Arduino (Update 22/03/10)

I'm going to show you how you can annoy a mac user using only a couple simple parts.

Macs have a built in IR sensor that allows you to control them using an apple remote, this makes them an easy target for this prank. We will be using an arduino with the apple remote library to randomly "press buttons."

The arduino will act like an apple remote and at a random interval it will "press" a random button, this will either be back, forward or menu, this can easily be changed in the sketch though.

Update (22/03/10) I have added a sketch that will first wait 5 minutes, to give you time to hide the arduino and will then randomly "press" any button every 0.5 seconds, this is sure to drive your target crazy!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The IR Sensor.

You may wonder where the IR sensor is,the sensor is found on both the imac and the macbook, it is however not found on the mac pro or the mac mini.
On the imac the sensor is hiding behind the black edge around the screen, right above the apple logo.
On the macbook pro it is on the right side of the front on the bottom half, it looks like a black line.
On the macbook it is in the same location, but here it's a black dot.

Step 2: Parts.

For this prank you will need:
- an arduino
- a couple IR LEDs
- some wire
- header pins (optional)

Step 3: Building the IR Emitter.

Place your IR LEDs onto your perfboard and solder them together in parallel, I used two LEDs but you can use as many as you like.

Solder the header pins to the wires for an easy connection with your arduino.

When you are done, cut the part out of your perfboard.

Step 4: The Code.

Connect the emitter to your arduino, connect the positive wire is connected to digital pin 13 and the negative to ground.

Install the attached library and upload one of the sketches to your arduino.
Note: for Arduino 1.0, use, for older versions user
The different sketches:

The arduino will pick a random time between 2 and 5 minutes and then "press" a random button, back, forward or menu.  You can modify the code to change the interval or add more buttons.

The other buttons:

- volume up:  ars.up()
- volume down:  ars.down()
- play/pause:


The arduino will first wait 5 minutes to allow you to hide it somewhere in the room, then it will randomly "press" any of the remote buttons every 0.5 seconds. This is sure to drive you target crazy!

These are my first arduino programs so they should be easy enough to understand and to modify to your likings. I do however ask that if you use this anywhere else that you refer to me. Also, never mind the comments, it was to amuse myself while writing  the code :)

Step 5: Finished!

When the code has finished uploading, connect a battery to your arduino and hide it somewhere, close to the target mac. Make sure the IR emitter is positioned at the mac and not obstructed by anything.

This will however not work if the mac is paired with a remote, this can be turned off easily in the settings but you will need physical acces to the mac.

To make hiding it easier you can also construct an enclosure to disguise it as something else, what I did can be seen in the next few steps.

Step 6: The Enclosure: Parts.

I decided to disguise my mac prank as a dvd spindle.

To build this you will need:
- a dvd or cd spindle.
- an obsolete disc.
- the paper label they put around these spindles. (not pictured)

Step 7: The Enclosure: Construction

Start by cutting off the plastic "stem" in the middle of the spindle.
With some spindles you can just twist this part to detach it from the bottom, you may need to shorten it a bit for it to fit later on.

Glue the IR emitter to the "stem".

Cut a small strip out from the label and tape it back together around the spindle, this is where the IR LEDs will shine through.

Step 8: The Enclosure: Construction Continued

Put the plastic cover back on the bottom and mark the position of the slot.

Take the cover off again and glue the "stem" with the emitter where you marked the slot, making sure that you can still put the cover back on.

To make it less obvious that there aren't any discs in this spindle, glue the obsolete disc to the top of the clear plastic cover and tape a small piece of black paper over the center hole.

Step 9: The Enclosure: Finished!

Now all that is left to do is to put the arduino and the battery back in the spindle and put the cover back on! Make sure the IR LEDs are behind the slot.

Now just hide the spindle somewhere and point the slot to the mac, since this used very little power you could leave this running for a long time, annoying the hell out of the person using the mac.

This was my instructable, I hope you liked it!

April Fools Day Project: Prank Contest

Participated in the
April Fools Day Project: Prank Contest

Be the First to Share


    • CNC Contest

      CNC Contest
    • Teacher Contest

      Teacher Contest
    • Maps Challenge

      Maps Challenge

    20 Discussions


    4 years ago on Introduction

    Hey !!

    I tried this project on a breadboard, but it doesn't seem to work... I tried it on my Mac Mini (which has a built in IR receiver), but I got no response from the Mac...


    4 years ago on Introduction

    Hello verry nice (of course)
    My question is : Why do you not use any resistors ?
    Thanks for your reply :D
    (i don't want to burn my IRleds)

    2 replies

    Reply 4 years ago

    If I recall correctly, the LEDs I used worked fine on 5 volts, but you're right, it's probably best to use a resistor.


    Reply 4 years ago on Introduction

    Thanks you so much for replying !
    Oh realy ? --.
    Does anybody have more info ?
    Anyway, I have two so I can burn one by making tests :D HéHé


    7 years ago on Introduction


    Could you re upload or send me the .pde files again? The ones that you have are .tmp's and are not readable when I open up the arduino program.

    3 replies

    Reply 7 years ago on Introduction

    I did that but with all 3 sketches loaded and open, i still get byte problems. Ive tried changing them to numbers but it won't work. Is there anyway I could get the whole arduino code simplfied including one of the pdes. (either one is fine)? im a bit of a noob and need to finish this up for a project.


    8 years ago on Introduction

    For those who don't want to become victim of pranks like this, I'd suggest an anti-dote....

    Open System Preferences Security pane and then check the box that says "Disable remote control infrared receiver".. Or if you still want to use your remote, but ONLY your remote, click the item below that that says "Pair"... Voila! (yeah I know, I'm a fun-spoiler!)


    8 years ago on Introduction

    Ah yes, I had this problem with using a macbook and an apple tv in the same room. The remotes are all the same. This would be fun to make as a wearable and just walk around the office.

    Mac Mini's have a IR sensor on the right end of the optical drive slot. I have a 2008 Model and the remote works fine.
    AFAIK the 2010 model doesn't have IR if it doesn't have an optical drive.


    8 years ago on Step 9

    LOL! This is just great! I haven't tried this but I bet a big media design office would be the perfect playground for this. Provided you want to get 15 people to end up as slaughtering maniacs ;)


    9 years ago on Introduction

    This is awesome, but if somebody is sitting in front of the computer, wouldn't they block the IR beam

    1 reply

    Reply 9 years ago on Introduction

    Thanks, you would have to hide it somewhere next to the computer so the beam shines between the person an the computer and onto the sensor.

    I was thinking "hmm.. interesting..." until I saw the enclosure part. Then I thought "Aw, sweet!"

    This truly is awesome; just one part I might do differently: use a part from the "middle" of the "stem", rather than the end of it, to hold the LEDs. Then, use the top part in place of the piece of paper for the CD. (Maybe even glue the top of the stem to inside the top of the clear cover part.)

    1 reply

    Thanks for the kind words.
    That's certainly a better idea then a piece of paper I didn't even think of doing that!


    Reply 9 years ago on Introduction

    I'm glad you like my instructable!
    Because I used the apple remote library I didn't have to figure out the sequences, which made this very easy to do.