Big Red Swearing Button

A large red emergency button, held in a hand, infront of a computer screen. On the screen are swear words.

I was inspired to hack together this big red swear button after a fun day teaching my students physical computing. The ultimate minimal macropad for Zoom meetings. It really is just a USB keyboard with 1 button. I worry that this might be the best thing I will ever make. 😉

Ingredients

  • A big Mushroom type emergency stop button, this has 2 micro switches inside. (thanks to Rob)
  • An Arduino Micro – Any Arduino with an 32u4 chip can act as a USB keyboard.
  • A USB cable
  • 2 Jumper wires
  • 1 or 2 cable ties or tape.

How to

This is really simple, and will take less than an hour.

1. Open up the button housing. Mine had 2 microswitches inside, I took one out to save it for another project.

2. Wire in the Arduino (pins 4 and GND) to the microswitch inside. No soldering needed if you use jumper wires, just a small screwdriver for the microswitch.

3. Feed the USB cable through the gland on the button, and add a cable tie, or some tape so that the USB cable doesn’t pull out and plug it into the Arduino. You should now have something that looks like this.

4. Cut and paste the code below into an Arduino Sketch and upload it to the board.

5. Check it works, then close up the button and you are done. Enjoy your online meetings!

Arduino Code

/*****   Random Swearing Generator  ******
ACBatchelor 03/2022
Uses an Arduino Micro or other 328p arduino capable of acting as USB keyboard. With 1 button or microswitch
********************************************************/
#include <Keyboard.h>

const int BUTTON_PIN = 4;        // the number of the pushbutton pin
const int DEBOUNCE_DELAY = 200;   // the debounce time, increase this if the output flickers

char *profanities[] = {"A$$hole", "B*ll*cks", "F**k", "Sh!t", "B!tch", "MotherF**ker",
                       "Fart", "Bloody Hell", "B**bies", "C*ck", "Damn", "Blast & Bother",
                       "F**wit", "Gosh Darn", "Knob", "W*nker", "Piss", "B*stard", "Willies",
                       "Poo", "S&!thead", "Anus", " ", "*%$*&!", " "
                      }; //Change this array to include your favorite profanities.

int CountTheSwears = 25; // Make this the size of your array

/********************************************************/
void setup() {
  pinMode(BUTTON_PIN, INPUT_PULLUP); // make pin 2 an input and turn on the pullup resistor...
                                     // ...so it goes high unless connected to ground
  Keyboard.begin();
}
/********************************************************/
void loop() {
  if (digitalRead(BUTTON_PIN) == LOW) {   //if the button is pressed
    int i = random (CountTheSwears); 
    Keyboard.println(profanities[i]); //Print a random swear word.
    delay(DEBOUNCE_DELAY); //Prevent accidental double presses.
  }
}