Complete Computing Environment: Body Computing System
Table of Contents
- Body Computing System Base System
- Keybindings
- Tasks
- DONE Finalize emacspeak installation
- DONE Make sure emacs starts on boot
- DONE Fix sound
- DONE Make bluetooth keyboard work to control emacs on boot
- NEXT a way to get buffer context
- NEXT way to read sauron
- DONE pull my n900 customizations in to bcj
- NEXT ocr for images on raspicam
- NEXT telegram support
- NEXT easier way to quickly load gnus
- NEXT cover the red led
- NEXT gnus doesnt read first article
- NEXT simple network status stuff
- DONE migrate off of helm
- NEXT quash twittering mode update messages
- NEXT gnus notifications
- NEXT get some clasps to keep power and headphones out of the way
- NEXT figure out how to get pinentry to work with espeak
- NEXT consider wiring up mcat to comint fror an elisp interface to matrix
- DONE Get some clasps to keep power and headphones out of the way
- NEXT install openvpn configuration on bcj
- NEXT prompt for morning prep tasks
- NEXT volume bindings
- NEXT move most of evening shutdown to work flow
- System Work Tasks
- Body Computing System Features
- INPROGRESS Photo Life Logger
- NEXT IR Blasting
- NEXT SMS Alerts
- NEXT Voice Capturing Notes
- NEXT Autistic Mode
- PLANNING SMS Sending
- PLANNING Integration with HomeHub
- PLANNING GPS Logging
- PLANNING Distance Walked / Traditional Activity Tracking
- PLANNING Northpaw
- PLANNING Heart Rate logging and biometrics
- PLANNING Posture Recognition
- PLANNING Authentication
- PLANNING Climate Control
Body Computing System Base System
My Body Computing System project is a pretty exciting thing. I have a goal of some day only owning two physical computers: One server somewhere under my control, running VMs with discrete function and purpose, and a personal computing device which melds to my workflow. A small piece of hardware that I wear on my person and can plug in to external devices for added functionality.
Imagine, in essence, plugging your phone in to a monitor and keyboard and suddenly having a 100% capable development machine. Or plugging it in to a projector or television and having it morph in to a media center which you can control with voice actions. And when I don't need it, it is invisible, waiting to deliver useful information or functionality exactly when I need it.
Currently, the Body Computing System is a Raspberry Pi, a cell phone battery pack, a small wireless keyboard, and some headphones. When CHIP ships, I will begin using it as the BCS core, as well as an interface via the PocketCHIP project that they've built.
The inspiration of this project comes from three places.
The first is the PAN which Manfred Macx where in the first saga of Charles Stross's Accelerando. In essence, he crammed a bunch of computing capabilities in to a vest and uses that as his only computer. Complete with a pair of glasses that would project a HUD for him, his system is a system we could see in existence even today. Indeed, my first iteration of the BCS is a ScottEVest vest that I may eventually pair with an Avegant Glyph.
The second inspiration is real-life, a TED talk that I watched in High School about the SixthSense system. Build a small system that provides ubiquitous computing integrated in to the real world in an intuitive way. I currently have strayed away from this inspiration since getting in to the meat of Computer Vision is not quite something I am ready for yet. Some day.
The third inspiration is the interface which Chief Aramaki computes with in Ghost in the Shell. A world where most people have chosen to cyberize their brains, giving them instant and transparent access to the internet and all of the knowledge and power it holds. Aramaki's neck interface served as the physical interface for his cyberbrain – Cyborg bodies had the clips in the back of their necks to create wired interfaces, but Chief's organic body does not. Obviously, I don't have a cyberbrain to interface with, but the idea of cramming computing aspects in to a system like this is actually not bad, and a rabbit hole that may be worth going down some time soon, in terms of design and implementation, should the SeV vest prove to not work for this use case.
(provide 'cce-bcs)
(defvar cce-mode nil) (defvar cce-bcs-minor-mode-map (let ((map (make-sparse-keymap))) map) "Keymap for `cce-bcs-minor-mode'") (define-minor-mode cce-bcs-minor-mode "Minor mode for providing CCE affordances for the Body Computing System \\{cce-bcs-minor-mode-map}" :global t :init-value nil :lighter "[BCS]" :keymap cce-bcs-minor-mode-map (if cce-bcs-minor-mode (cce/disable-bcs-mode) (cce/enable-bcs-mode))) (add-to-list 'desktop-minor-mode-table '(cce-bcs-minor-mode . nil)) (defun cce/enable-bcs-mode () (unless (and (boundp 'cce-mode) (eq cce-mode 'bcs)) (setq smex-auto-update nil) (emacspeak-pronounce-refresh-pronunciations) (when dtk-quiet (dtk-toggle-quiet t) (emacspeak-toggle-auditory-icons t)) (run-hooks cce-bcs-minor-mode-hooks) (setq cce-mode 'bcs))) (defun cce/disable-bcs-mode () (when (and (boundp 'cce-mode) (eq cce-mode 'bcs)) (setq smex-auto-update t) (dtk-stop) (dtk-toggle-quiet t) (emacspeak-toggle-auditory-icons t) (setq cce-mode nil))) (defvar cce-bcs-minor-mode-hooks nil "Hooks to run once the BCS minor mode is enabled") (add-hook 'after-cce-hook (lambda () (cce/with-any-domain '("bcs") (cce-bcs-minor-mode 1))))
(define-minor-mode cce-kindle-minor-mode "Minor mode for providing CCE affordances for the Body Computing System \\{cce-kindle-minor-mode-map}" :global t :init-value nil :lighter "[KINDLE]" :keymap nil (if cce-kindle-minor-mode (cce/disable-kindle-mode) (cce/enable-kindle-mode))) (add-to-list 'desktop-minor-mode-table '(cce-kindle-minor-mode . nil)) (defvar cce-kindle-minor-mode-map (let ((map (make-sparse-keymap))) map) "Keymap for `cce-kindle-minor-mode'") (defun cce/enable-kindle-mode () (global-font-lock-mode t)) (defun cce/disable-kindle-mode () (global-font-lock-mode -1)) (defvar cce-kindle-minor-mode-hooks nil "Hooks to run once the KINDLE minor mode is enabled")
Keybindings
A lot of the keybindings provided by the BCS modes need to be little more than wrappers for a command that speak the output; things like the current time, network connection details, transit information, that sort of thing.
The first thing is a binding that spits out network information, what SSID the Body Computing System is connected to, and its IP address.
(defun cce/network-info () (interactive) (let* ((ip-buf (get-buffer-create "*ip*")) (net-buf (get-buffer-create "*wifi*"))) (shell-command "ip addr | grep wlan0 | tail -n1 | awk '{ print $2 }' | cut -d/ -f1" ip-buf) (shell-command "nmcli con | grep wlan0 | awk '{ print $1 }'" net-buf) (format "Connected to %s with address %s" (with-current-buffer net-buf (buffer-string)) (with-current-buffer ip-buf (buffer-string))))) (define-key cce-bcs-minor-mode-map (kbd "C-c e n") (lambda () (interactive) (emacspeak-speak-string (cce/network-info) emacspeak-speak-paragraph-personality)))
Tasks
DONE Finalize emacspeak installation
DONE Make sure emacs starts on boot
DONE Fix sound
echo snd_bcm2835 | sudo tee -a /etc/modules:usermod -aG audio rrixusermod -aG rtkit rrix
DONE Make bluetooth keyboard work to control emacs on boot
DONE pull my n900 customizations in to bcj
DONE migrate off of helm
DONE Get some clasps to keep power and headphones out of the way
System Work Tasks
NEXT Sleeve/input systems
- NEXT Get adafruit bluefruit stuff working
- INPROGRESS Sleeve
- DONE Purchase sewing thread PURCHASE @STORE
- DONE Purchase scissors @STORE PURCHASE
- INPROGRESS Sew the wearable sleeve platform in
- INPROGRESS serial queue listener
- NEXT vibration motors
- NEXT switches and buttons
- NEXT LUX announcer
- WAITING LUX consumer and tsdb
- NEXT Review Linear SoftPot (Ribbon Sensor) {100mm} ID: 178 - $7.95 : Adafruit Industries, Unique & fun DIY electronics and kits
- DONE Purchase sewing thread PURCHASE @STORE
Body Computing System Features
INPROGRESS Photo Life Logger
Use the Raspberry Pi camera module (Adafruit) instead of using my GoPro which will add a lot of complexity to the project for little gain. The more I type this out, the more interesting that sounds, and I'd like to use the Pi Camera for this instead. We basically need to wire this up to the Pi and create a world where it's okay to reboot the Pi; it'll need an RTC basically, so that we can set the time at boot and make sure the metadata on the photos is proper.
- Single Press Photo
- Single Press Video
(defun cce/raspicam-photo () "Take a photo with raspicam" (async-shell-command "~/bin/raspicapture.sh" (get-buffer-create "*raspicam*") (get-buffer-create "*raspicam-error*"))) (define-key cce-bcs-minor-mode-map (kbd "C-c t") 'cce/rapsicam-photo)
OUTPUT_DIR=/home/rrix/lifestream/ FILENAME="capture_$(date +%s).jpg" mkdir -p $OUTPUT_DIR sudo /opt/vc/bin/raspistill -w 800 -h 600 -q 90 -o $OUTPUT_DIR/$FILENAME -t 2500 -rot 180 sudo chown -R rrix.rrix $OUTPUT_DIR
[Unit] Description=Take a photo with raspistill [Service] Type=simple ExecStart=/home/rrix/bin/raspicapture.sh
[Unit] Description=Take a photo every x minutes [Timer] OnUnitActiveSec=%i OnBootSec=%i Unit=raspicam.service [Install] WantedBy=default.target
link-this $PWD/out/raspicapture.sh ~/bin/raspicapture.sh chmod +x ~/bin/raspicapture.sh link-this $PWD/out/raspicam.service ~/.config/systemd/user/raspicam.service link-this $PWD/out/raspicam.timer ~/.config/systemd/user/raspicam.timer systemctl --user daemon-reload systemctl --user enable raspicam@5min.timer
NEXT IR Blasting
Build in a system of high power IR LEDs that we can use to disappear from cameras
Adafruit sells these for super cheap and we could connect these up to a MOSFET powered by one of the brain's GPIO pins.
I think I'd want two sets, a pair that mounts on my glasses to obscure my face, and a set that would obscure the rest of my upper body. The neat thing is that my glasses have a pair of magnets designed to allow you to attach sunglasses to them, which we could exploit to make mounting these LEDs seamless.
NEXT SMS Alerts
I want to port my number from Google Voice to Twilio, and to not need to own a cell phone; my body computing system should provide external hotspot; the system would connect to that hotspot for internet connectivity and poll Twilio for SMS statuses.
The alerts themselves would be handled with something akin to a smartwatch – whether that is my pebble or not – or a vibration alert system paired with the interface device.
NEXT Voice Capturing Notes
Not necssary speech recognition; could just spit out ogg files for later transcription.
Right now I'm thinking I'll just a microphone with the Pi and a momentary switch for recording.