A one button device that emulates a keyboard and mutes audio to alert a headphone wearing user of another person's physical presence.
Python Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Doorbell.ino
LICENSE
README.md
doorbell.py

README.md

Hackers Doorbell

A one button device that emulates a keyboard and mutes audio to alert a headphone wearing user of another person's physical presence.

button in glass jar with usb cord

What it does:

When someone pushes the button, the device simulates the pause button being pushed on the keyboard, then the mute button. After that it quickly inverts and uninverts the colors on the screen by using a built in Apple shortcut. Finally it unmutes the volume. This should alert the computer user to the presence of someone else.

Demo:

button in glass jar pauses music on computer.

In addition to muting audio, the screen flashes and the music app goes from playing to paused.

Why:

I work in an open office, and have issues focusing when people are talking around me, so I often wear large overear headphones and listen to music. This is fine except that when people need to get my attention they often either tap me on the shoulder or have to stand and talk loudly into my (headphone covered) ears, or wave something awkwardly close to me (since I sit in a corner they can't just walk in front of my desk). I'm fine with the physical contact but it's still a little jarring when you're deep in flow and it can be awkward for other people. With this device, my coworkers can simply push a button that lays next to my desk and not startle me.

How:

I use a Teensy 3.1 microprocessor connected to a push button to emulate a keyboard. When the button is pushed a series of keyboard shortcuts is executed.

Cool Thing About this Approach:

You don't need any special software running on your mac, just the ability to enable a default keyboard shortcut.

Materials:

  • Teensy 3.1 ($20) - any microprocessor that supports HID Keyboard emulation should work. I just had one of these laying around. A TEENSY LC is $12 and should also work. Sparkfun’s ProMicro ($20) should also work.
  • Push Button (~$2). I a few arcade style buttons around, but this one should work (keep in mind your case space constraints).
  • 10k pullup resistor
  • A case. I used a glass nug jug from CBCB in Berkeley. Sometimes you need to buy their top shelf stuff to get glass jars, so YMMV.
  • Miscellaneous connectors (I recommend using headers so you can reuse your board for a later project potentially)
  • Solder
  • USB Cable

Tools:

  • Soldering Iron
  • Pen to trace your cuts
  • Case cutting tool(s). I used my soldering iron to cut up the case, because I love the smell of chlorine / am lazy and a bad person. I recommend you use a vice + drill press + rotary tool + a little sandpaper. Way cleaner looking results and your eyes won't hurt from the smell of burning chlorine.

Software:

Other:

Buying a Doorbell:

Do you want one of these devices, for yourself or a coworker? Maybe a department pack? Please send me an email (gh username @ gmail.com). If enough people express interest, I may look into reducing the cost, and either selling kits or preassembled units. I could also add a dip switch so that people could easily change shortcuts to work with their OS of choice.

Bonus:

If you've read this far you deserve a bonus! In this repo I included doorbell.py, a small flask app that allows for similar functionality to the physical button. Run the server on your local machine and give out your ip address to your peers, and let them bookmark it. They can click the link when you aren't responding to your chat.

pip install flask
python doorbell.py

To get your current IP address: ifconfig | grep inet

The server runs on port 5000, so pass on the ip to your coworkers with it appended, e.g. http://192.168.1.137:5000. You may want to background the app using tmux and/or add it as a startup item. Also, a warning, there is no rate limiting with this simple app so it's pretty easy to get DOSed by a funny coworker.

Thanks for reading!