# Make a Google Glass remote with Bluefruit

## Overview

Google Glass can be controlled by voice command, touchpad or the Myglass App. However, I noticed that when you stay outside in winter, voice commands wouldn't work as well due to wind (and wearing a scarf!) and I find myself reluctant to take my hands out of my pocket and remove my mittens. So for winter use, I designed this remote to control Google Glass.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/949/medium800/projects_Photo_Aug_17__8_42_10_PM.jpg?1383284907)

# Make a Google Glass remote with Bluefruit

## Components and Wiring

To build a remote, you will need a Bluefruit, several buttons, breadboard and wires. Also you need a power supply. You can use a Lithium battery or a 3xAA or 3xAAA battery pack to make it portable.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/039/medium800/projects_Screen_shot_2013-11-03_at_1.05.47_AM.png?1383458782)

The wiring is pretty simple. For each button, one end needs to be connected to ground, and the other one should be connected to one key pin of Bluefruit. And you need to connect power to Vin and GND.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/040/medium800/projects_Screen_shot_2013-11-03_at_1.09.14_AM.png?1383459009)

# Make a Google Glass remote with Bluefruit

## Remap keys

Before you use Bluefruit with Google Glass, the keys should be remapped to function keys to control Glass. We can use arrow keys to navigate items. Use ESC key to cancel and RETURN to select. Also we can use snapshot key to take a picture. Support for the snapshot report (and other consumer reports) is added in v1.2 but you can use regular keys in v1.0 or v1.1  
  
[You can use the graphical remapping sketch to map each key.](http://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/remapping-the-buttons-wireless)

![](https://cdn-learn.adafruit.com/assets/assets/000/012/047/medium800/projects_Screen_shot_2013-11-03_at_11.45.32_AM.png?1383497555)

![](https://cdn-learn.adafruit.com/assets/assets/000/012/048/medium800/projects_Screen_shot_2013-11-03_at_12.05.03_PM.png?1383498391)

You can select input type, key type and key. In this case, it is "KEYBOARD","SYMBOL&FUNC" and "LEFTARROW". Then you click "ADD\_KEY" button to add it.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/049/medium800/projects_Screen_shot_2013-11-03_at_12.10.31_PM.png?1383498759)

Before you upload this mapping to Bluefruit. Make sure Bluefruit is paired to the computer you are using. You can press "SEND\_MAP" to upload mapping. If you see "Key mapping sent successfully", you can hold the button on Bluefruit to unpair it with computer.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/050/medium800/projects_Screen_shot_2013-11-03_at_12.48.22_PM.png?1383501236)

Now it is ready for Google Glass.

# Make a Google Glass remote with Bluefruit

## Pair Bluefruit with Google Glass

By default the Google Glass can only act as a peripheral device that be paired to your tablet or phones as an accessory. But it can also behave as a central device that search and connect to other devices.   
  
This method is first revealed in [Voiding Your Warranty: Hacking Glass](https://developers.google.com/events/io/sessions/332704837) session at Google I/O. If you want to go straight to see how it works, you can use this [link](http://youtu.be/OPethpwuYEk?t=7m35s).  
  
In order to access to settings panel, first you need a working Android SDK, you can refer to this [GDK tutorial](https://developers.google.com/glass/gdk).  
  
Then you need to install two apps by typing following command to install them:

- adb install Settings.apk
- adb install Launcher2.apk

However Google did not release the two apks officially. But Jeff did some research on it and compiled these two apks and released them on his [blog](http://www.glassxe.com/2013/05/23/settings-apk-and-launcher2-apk-from-the-hacking-glass-session-at-google-io/). You can either download from his site or download the following zip file.

[glass_settings.zip](http://learn.adafruit.com/system/assets/assets/000/011/983/original/glass_settings.zip?1383453385)
After your installation of Settings and Launcher2. you can swipe all the way left to settings.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/984/medium800/projects_bluetooth_pair_settings.png?1383454021)

Tap your trackpad you will see the Launcher option. Do not check "Use default for this action"or you can not access the other option until you uninstall Launcher2.apk

![](https://cdn-learn.adafruit.com/assets/assets/000/011/985/medium800/projects_bluetooth_pair_Launcher.png?1383454085)

In Launcher you will see the classic Android home screen. Click the All Apps button.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/988/medium800/projects_bluetooth_pair_Home.png?1383454522)

In All apps screen, you will see three Apps. "Glass Home" will take you back to Google Glass home screen. "Launcher" will show the Android home screen again and "Settings" will lead to settings panel.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/986/medium800/projects_bluetooth_pair_Launcher_setting.png?1383454405)

In settings panel you can choose "Bluetooth" to pair Bluefruit. You can also go to "Display"-\>"Sleep" to keep screen on longer without interaction.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/989/medium800/projects_bluetooth_pair_Launcher_bt.png?1383455134)

Then you can search and pair devices just like you are using a regular Android device.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/990/medium800/projects_bluetooth_pair_Launcher_bt_all.png?1383455274)

# Make a Google Glass remote with Bluefruit

## Test on Google Glass

When Bluefruit is connected to Google Glass. You can press buttons and corresponding key commands will be sent to Google Glass. The following picture shows that I took a picture by press a button on Bluefruit.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/051/medium800/projects_20131103_133028_441_x.jpg?1383505084)

# Make a Google Glass remote with Bluefruit

## Unpair Bluetooth devices

In google glass you can click an Bluetooth item to disconnect it. But there is no way to click the icon on right side to unpair that device in it's subscreen.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/991/medium800/projects_bt_unpair_0.png?1383456768)

In order to prevent paired devices from piling up, I wrote a small app in eclipse that allow you to unpair Bluetooth devices. If you have "No Launcher activity found!" error in eclipse, you can:  
Go to Run \> Run Configurations. Then, under Launch Action, change it from Launch Default Activity to Launch; and select the activity listed in the dropdown. Hit Apply and try running the APK again.

![](https://cdn-learn.adafruit.com/assets/assets/000/011/992/medium800/projects_Screen_shot_2013-11-03_at_1.38.52_AM.png?1383457176)

[BT_erase.zip](http://learn.adafruit.com/system/assets/assets/000/011/993/original/BT_erase.zip?1383457239)
When the app is running on Google Glass. You will see a list of paired devices.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/004/medium800/projects_bt_p.png?1383457871)

You can choose the device you want to unpair and click it. An asterisk will appear on it's right side.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/009/medium800/projects_bt_select.png?1383457946)

Then click "Unpair" button, the selected device will disappear, indicating it is no longer paired.

![](https://cdn-learn.adafruit.com/assets/assets/000/012/012/medium800/projects_bt_dis.png?1383458034)


## Featured Products

### Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller

[Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller](https://www.adafruit.com/product/1535)
Create your own wireless Bluetooth keyboard controller in an hour with the Bluefruit EZ-Key: it's the fastest, easiest and bestest Bluetooth controller. We spent years learning how to develop our own custom Bluetooth firmware, and coupled with our own BT module hardware, we've created...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1535)
[Related Guides to the Product](https://learn.adafruit.com/products/1535/guides)
### Lithium Ion Polymer Battery - 3.7v 1200mAh

[Lithium Ion Polymer Battery - 3.7v 1200mAh](https://www.adafruit.com/product/258)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 1200mAh for a total of about 4.5 Wh. If you need a larger battery, <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/258)
[Related Guides to the Product](https://learn.adafruit.com/products/258/guides)
### Half Sized Premium Breadboard - 400 Tie Points

[Half Sized Premium Breadboard - 400 Tie Points](https://www.adafruit.com/product/64)
This is a cute, half-size breadboard with&nbsp;400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm&nbsp;x 5.5cm&nbsp;with a standard double-strip in the middle and two power rails on both sides.&nbsp;You can pull the power rails off easily to make the breadboard as...

In Stock
[Buy Now](https://www.adafruit.com/product/64)
[Related Guides to the Product](https://learn.adafruit.com/products/64/guides)
### Breadboarding wire bundle

[Breadboarding wire bundle](https://www.adafruit.com/product/153)
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent wires" that are sometimes sold with breadboards, and faster than stripping your own solid core wires. Makes...

In Stock
[Buy Now](https://www.adafruit.com/product/153)
[Related Guides to the Product](https://learn.adafruit.com/products/153/guides)
### Tactile Button switch (6mm) x 20 pack

[Tactile Button switch (6mm) x 20 pack](https://www.adafruit.com/product/367)
Little clicky switches are standard input "buttons" on electronic projects. These work best in a PCB but [can be used on a solderless breadboard as shown in this tutorial](https://learn.adafruit.com/adafruit-arduino-lesson-6-digital-inputs?view=all). The pins are normally...

In Stock
[Buy Now](https://www.adafruit.com/product/367)
[Related Guides to the Product](https://learn.adafruit.com/products/367/guides)

## Related Guides

- [Adafruit VCNL4030 Proximity and Lux Sensor](https://learn.adafruit.com/adafruit-vcnl4030-proximity-and-lux-sensor.md)
- [Adafruit OPT4048 XYZ Color Sensor](https://learn.adafruit.com/adafruit-opt4048-xyz-color-sensor.md)
- [Using an Infrared Library on Arduino](https://learn.adafruit.com/using-an-infrared-library.md)
- [Owl IR TV Remote](https://learn.adafruit.com/owl-ir-tv-remote.md)
- [Circuit Playground Express Spooky Laughing Box](https://learn.adafruit.com/spooky-circuit-playground-express-mystery-box.md)
- [Pro Trinket Tachometer](https://learn.adafruit.com/pro-trinket-tachometer.md)
- [Adafruit VEML6070 UV Sensor Breakout](https://learn.adafruit.com/adafruit-veml6070-uv-light-sensor-breakout.md)
- [Flippy Floppy Drive Modification](https://learn.adafruit.com/flippy-floppy-drive-modification.md)
- [Stained Glass Lamp](https://learn.adafruit.com/stained-glass-lamp.md)
- [Color Sensing Music Player](https://learn.adafruit.com/color-sensing-music-player.md)
- [Electronic Animated Eyes for ARM Microcontrollers](https://learn.adafruit.com/animated-electronic-eyes.md)
- [Tent Lantern](https://learn.adafruit.com/tent-lantern.md)
- [Automatic Monitor Color Temperature Adjustment](https://learn.adafruit.com/automatic-monitor-color-temperature-adjustment.md)
- [BioShock little sister syringe](https://learn.adafruit.com/bioshock-little-sister-syringe.md)
- [Adafruit TSSP77038 38KHz Infrared IR Demodulator Breakout](https://learn.adafruit.com/adafruit-tssp77038-38khz-infrared-ir-demodulator-breakout.md)
