PDXNode / nodebotsday

PDX Nodebots Day!
3 stars 0 forks source link

NPM module for phone to sensors #1

Closed hackygolucky closed 7 years ago

hackygolucky commented 11 years ago

NPM module to turn phone into sensors.

chrisdickinson commented 11 years ago

So, ideally, there'd be a module that did:

var senses = require('phone-sensor')

senses(function(sensor) {
  if(sensor.capabilities.orientation) {
    sensor.createOrientationStream().pipe(/* to something that consumes orientations */)
  }

  if(sensor.capabilities.video) {
    sensor.createVideoStream().pipe(/* to something amazing */)
  }

  // other apis: audio, geolocation, etc etc
})

And would work with iOS/Android devices. It would really cut down on the number of sensors we'd have to procure.

chrisdickinson commented 11 years ago

first stab