BB-8 wasn't built to just sit on your desk. It wants to tell you stuff. Let it.
-
A Sphero BB-8 (though not tested, it may work with other Sphero products).
-
Only tested on Mac OS, though may work on other systems. Instructions assume you use Homebrew and Zsh - need to be adapted for other setups.
brew install node # Install Node.js
git clone [email protected]:jschementi/bb8.git # Clone this repo
cd bb8 && npm install # Install dependencies
node index.js # Run notification server
source notify.zsh # Enable notifications for
# command exit codes (add to
# .zshrc to always enable).
When running a command that exits successfully (exit code == 0
), BB-8 will glow
green.
Otherwise (exit code != 0
), BB-8 will glow red.
The Das Keyboard 5Q got me thinking about using lights and color to provide custom notifications. I've always wanted a "build broken" orb for my desk, but never got around to doing it. When my kids asked to play with BB-8, I thought it would be just too perfect if I could just hack BB-8 to be my own custom status light, since it normally sits on my desk doing nothing. Once I found the Sphero SDK, I first felt stupid for owning this thing for 8 months and not hacking it yet. Shame is a powerful motivator, so here we are.
I didn't back the Das Keyboard 5Q because I prefer compact keyboards (without a numpad), so can't wait to see if Das Keyboard makes a compact version.
Shell integration was just the low-hanging-fruit to start with. Having BB-8 glow red/green based on process exit codes handles a bunch of situations I wanted, like build and test failures, but zero=green non-zero=red is a very narrow style of notification.
Ultimately, it'd be nice to have a local service that recieves arbitrary events from your system or the internet, and responds to them in customizable ways.
For example:
- Pulse red when I have a meeting
- Shake head "yes" when I finish a todo.txt task
Pull Requests welcome!