Skip to content

Instantly share code, notes, and snippets.

@kevinswiber
Created December 5, 2014 00:37
Show Gist options
  • Select an option

  • Save kevinswiber/c3d815605716a4a2e3a7 to your computer and use it in GitHub Desktop.

Select an option

Save kevinswiber/c3d815605716a4a2e3a7 to your computer and use it in GitHub Desktop.
Sampling light sensor every 5 seconds.
var zrx = require('zrx');
zrx()
.load('http://zetta-cloud-2.herokuapp.com')
.server('Detroit')
.device(function(d) {
return d.type === 'light';
})
.stream('luminosity')
.sample(5000)
.subscribe(console.log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment