Skip to content

Latest commit

 

History

History
63 lines (61 loc) · 1.13 KB

README.md

File metadata and controls

63 lines (61 loc) · 1.13 KB

Daydream Controller

A JS library for using daydream controllers in Javascript!

How to use

Get controller api

var controller = new DaydreamController(); // returns Object

Connect to device

controller.connect(); // returns Bool

Disconnect from device

controller.disconnect(); // returns Undefined

Get all info

controller.getInfo(); // returns Object

{
  battery: int,
  model: string,
  serial: string,
  firmware: float,
  hardware: float,
  software: string,
  manufacturer: string,
  pnp_id: string
}

Get battery

controller.getBattery(); // returns Int (0 - 100)

Get model

controller.getModel(); // returns String

Get serial

controller.getSerial(); // returns String

Get firmware revision

controller.getFirmware(); // returns Float

Get hardware revision

controller.getHardware(); // returns Float

Get software revision

controller.getSoftware(); // returns String

Get manufacturer name

controller.getManufacturer(); // returns String

Get PnP ID

controller.getPnPID(); // returns String