# How to use Google Glass flashlight

## Introduction

http://youtu.be/12lATapDKrU

This is a small flashlight accessory for Google Glass. It can be plugged into the USB port of Google Glass and stay there. Then you can use your voice command to control this little gadget to give some extra light in dark environment.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/920/medium800/hacks_Glass_light_Photo_Dec_05__1_35_58_AM.jpg?1398190468)

This tutorial is prepared for XE16 version of Google Glass. Since Google Glass is still in beta and everything is changing, please come back and check updates when a new version of system is released.

![](https://cdn-learn.adafruit.com/assets/assets/000/018/871/medium800/hacks_getitonglass_172x60_action_button.png?1408373923)

[Get it on Glass](https://glass.google.com/u/0/glassware/5841983547267730059)

# How to use Google Glass flashlight

## Sideload app with ADB (Deprecated)

This method is deprecated and no longer maintained. Please install Glassware though Myglass Page. This page is for reference only.&nbsp;

&nbsp;

1. First of all you need to download Android SDK, which contains ADB tool

[http://developer.android.com/sdk/index.html](http://developer.android.com/sdk/index.html)

![](https://cdn-learn.adafruit.com/assets/assets/000/015/921/medium800/hacks_Capture_SDK.png?1398198999)

And turn on debug on Glass

![](https://cdn-learn.adafruit.com/assets/assets/000/015/927/medium800/hacks_Debug_shot.png?1398211211)

You should find adb tool in sdk/platform-tools folder.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/922/medium800/hacks_Capture_adb_loc.png?1398199223)

Then you can open cmd (Terminal in other OS) to run that tool and see if your Glass is visible. (adb devices) If you don't see your device, you may need to refer to [http://stackoverflow.com/questions/16928983/google-glass-adb-devices-doesnt-find-omap4430-driver-not...](http://stackoverflow.com/questions/16928983/google-glass-adb-devices-doesnt-find-omap4430-driver-not-installed-cant-find/17138336) to install driver.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/928/medium800/hacks_cmd_shot.png?1398211321)

Download app: [https://github.com/DeqingSun/USB\_flashlight\_Glass/raw/master/apk\_generated/XE16/USB\_flashlight\_Glass...](https://github.com/DeqingSun/USB_flashlight_Glass/raw/master/apk_generated/XE16/USB_flashlight_Glass.apk "Link: https://github.com/DeqingSun/USB\_flashlight\_Glass/raw/master/apk\_generated/XE16/USB\_flashlight\_Glass.apk")  
And install it (adb install path\_of\_apk\_file)

![](https://cdn-learn.adafruit.com/assets/assets/000/015/929/medium800/hacks_install_shot.png?1398211711)

You should see the voice command when you say "ok,glass"

![](https://cdn-learn.adafruit.com/assets/assets/000/015/931/medium800/hacks_ok_shot.png?1398211923)

# How to use Google Glass flashlight

## How to activate flashlight

If you say "toggle flashlight" without the flashlight attached, you will see.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/932/medium800/hacks_not_found_shot.png?1398215796)

But if you attach flashlight before launch this app you will see permission dialog box. You need to give this app permission to access USB. This dialog won't appear again if permission is granted.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/933/medium800/hacks_first_shot.png?1398215949)

When permission is granted you will see "Flashlight toggled" and flashlight will be on. You can simply say "ok glass, toggle flashlight" again to turn it off.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/934/medium800/hacks_toggle_shot.png?1398215999)

# How to use Google Glass flashlight

## Hacking guides

All code for this project is hosted on Github:  
[https://github.com/DeqingSun/USB\_flashlight\_Glass](https://github.com/DeqingSun/USB_flashlight_Glass)

If you are an Android Developer and wish to develop your own app:  
  
You can send the following commands to out endpoint control the LED.  
  
1 byte: 0x80, to toggle LED  
2 bytes: 'F','T', to toggle LED  
2 bytes: 'F','O', to turn LED on  
2 bytes: 'F','F', to turn LED off

If you are a hardware hacker:  
  
You can use the following schematic and layout to add your own feature.   
  
Either Low-Voltage Programming via USB pins or High-Voltage Programming on RC0 and RC1 can be used to update firmware.

![](https://cdn-learn.adafruit.com/assets/assets/000/015/918/medium800/hacks_GF_SCH.png?1398185699)

![](https://cdn-learn.adafruit.com/assets/assets/000/015/919/medium800/hacks_GF_PCB.png?1398185734)


## Featured Products

### Flashlight for Glass - Voice-Controlled Flashlight

[Flashlight for Glass - Voice-Controlled Flashlight](https://www.adafruit.com/product/1848)
Face the future with handy illumination. We're proud to carry the first hardware accessory for the Google Glass! Why stick with plain old face-wearable technology when you could accessorize? Flashlight for Glass is a voice-controlled Glass-mounted flashlight. After installing the...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1848)
[Related Guides to the Product](https://learn.adafruit.com/products/1848/guides)

## Related Guides

- [Adafruit MiniPOV3 Kit](https://learn.adafruit.com/minipov3.md)
- [DS1307 Real Time Clock Breakout Board Kit](https://learn.adafruit.com/ds1307-real-time-clock-breakout-board-kit.md)
- [Adafruit SPI FLASH Breakouts](https://learn.adafruit.com/adafruit-spi-flash-breakouts.md)
- [Adafruit ATWINC1500 WiFi Breakout](https://learn.adafruit.com/adafruit-atwinc1500-wifi-module-breakout.md)
- [LSM6DSOX, ISM330DHC, & LSM6DSO32 6 DoF IMUs](https://learn.adafruit.com/lsm6dsox-and-ism330dhc-6-dof-imu.md)
- [Adafruit Chainable DS18B20 Extender Breakout](https://learn.adafruit.com/adafruit-chainable-ds18b20-extender-breakout.md)
- [Adafruit PiCowbell Proto for Pico](https://learn.adafruit.com/picowbell-proto.md)
- [Adafruit OPT4048 XYZ Color Sensor](https://learn.adafruit.com/adafruit-opt4048-xyz-color-sensor.md)
- [USB C CC Resistor Fixer Case](https://learn.adafruit.com/resistor-fixer-case.md)
- [Adafruit 2.13" 250x122 Quad-Color eInk](https://learn.adafruit.com/adafruit-2-13-250x122-quad-color-eink.md)
- [Sending Live Sensor Data to iOS with BLE](https://learn.adafruit.com/bno055-ble-ios-app.md)
- [Protect Your Online Accounts with Strong Passwords & Password Managers](https://learn.adafruit.com/protect-your-social-media-online-accounts-with-a-strong-password-manager.md)
- [Cup o' Sound](https://learn.adafruit.com/cup-o-sound.md)
- [Adafruit Power Relay FeatherWing](https://learn.adafruit.com/adafruit-power-relay-featherwing.md)
- [Adafruit LIS2MDL Triple Axis Magnetometer](https://learn.adafruit.com/adafruit-lis2mdl-triple-axis-magnetometer.md)
