Skip to content

Instantly share code, notes, and snippets.

@timothyclemans
Created May 1, 2014 18:50
Show Gist options
  • Save timothyclemans/11458775 to your computer and use it in GitHub Desktop.
Save timothyclemans/11458775 to your computer and use it in GitHub Desktop.
[wearscript] myo
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0; color:#FFF">
Myo2
<script>
function server() {
WS.myoPair(WS.myoTrain);
WS.gestureCallback('onMyo', function (x) {
WS.say(x);
});
WS.sensorOn('myoOrientation', .15, function (data) {
WS.log('got data: ' + JSON.stringify(data));
});
WS.sensorOn('myoAccelerometer', .15);
WS.sensorOn('myoGyroscope', .15);
WS.dataLog(false, true, .15);
}
function main() {
if (WS.scriptVersion(1)) return;
WS.serverConnect('{{WSUrl}}', server);
}
window.onload = main;
</script></body></html>
{"name": "Myo Demo"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment