Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Cylon = require('cylon');
- Cylon.api({
- host: process.env.HOST || '0.0.0.0',
- port: process.env.PORT || '8080',
- //ssl: false // tried with and without this
- });
- Cylon.robot({
- name: 'pebble',
- connections: {
- pebble: { adapter: 'pebble' }
- },
- devices: {
- pebble: { driver: 'pebble' }
- },
- work: function(my) {
- my.pebble.send_notification("Hello Pebble!");
- my.pebble.on('button', function(data) {
- console.log('Button Pussed: ', data);
- });
- my.pebble.on('tap', function(data) {
- console.log('Tap event detected!');
- });
- }
- }).start();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement