Skip to content

Instantly share code, notes, and snippets.

@stefanoverna
Created June 19, 2018 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanoverna/2a7f842b8e885a55203c6fd5861197c6 to your computer and use it in GitHub Desktop.
Save stefanoverna/2a7f842b8e885a55203c6fd5861197c6 to your computer and use it in GitHub Desktop.
Simply.js Pebble
console.log('Ciao!');
simply.on('singleClick', function(e) {
console.log(util2.format('single clicked $button!', e));
simply.subtitle('Pressed ' + e.button + '!');
});
simply.on('longClick', function(e) {
console.log(util2.format('long clicked $button!', e));
simply.vibe();
simply.scrollable(e.button !== 'select');
});
simply.on('accelTap', function(e) {
console.log(util2.format('tapped accel axis $axis $direction!', e));
simply.subtitle('Tapped ' + (e.direction > 0 ? '+' : '-') + e.axis + '!');
});
simply.setText({
title: 'Simply Demo!',
body: 'This is a demo. Press buttons or tap the watch!',
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment