A one button device that emulates a keyboard and mutes audio to alert a headphone wearing user of another person's physical presence.
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.
In addition to muting audio, the screen flashes and the music app goes from playing to paused.
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.
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.
- 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)
- Break Away Headers - you need male and female (Spacing: 0.1"/ 2.54 mm)
- Wire and terminal connectors to connect to your button
- USB Cable
- 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.
- Arduino IDE (1.8.2 at time of writing)
- Teensy Loader App (1.33 at time of writing)
- Teensy Arduino Install Package (1.36 at time of writing)
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.
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!