Skip to content

Instantly share code, notes, and snippets.

View drGrove's full-sized avatar
😎

Danny Grove drGrove

😎
View GitHub Profile
@drGrove
drGrove / ccccc
Created March 21, 2014 03:25 — forked from bwhite/glass.html
[wearscript] AR Warp with circles
dssfdfs
@drGrove
drGrove / glass.html
Created March 21, 2014 04:51 — forked from bwhite/glass.html
[wearscript] Read which AR tag is in front of you
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000">
<script>
function server() {
WS.cameraOn(1, 360, 640);
WS.dataLog(false, true, .15);
WS.subscribe('warptags', function (channel, tags) {
if (tags.length) {
WS.say(tags[0][0]);
}
@drGrove
drGrove / glass.html
Created March 21, 2014 23:38
[wearscript] A Test
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function cb(data) {
// Changes canvas color with head rotation
@drGrove
drGrove / dkafljd.html
Created March 23, 2014 02:52
[wearscript] test
fdakfdjlakj
@drGrove
drGrove / glass.html
Created March 24, 2014 20:18 — forked from coryk135/glass.html
[wearscript] Myo
<html>
<head>
<meta charset="utf-8">
<title>2048</title>
<style>
html, body {
margin: 0;
padding: 0;
background: #faf8ef;
@drGrove
drGrove / glass.html
Created March 24, 2014 21:11
[wearscript] Simple
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!-- You can include external scripts here like so... -->
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
WS.log('Welcome to WearScript');
@drGrove
drGrove / glass.html
Created March 24, 2014 21:48 — forked from bwhite/glass.html
[wearscript] Myo Demo
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function server() {
setTimeout(WS.myoTrain, 250);
return;
WS.gestureCallback('onMyo', function (x) {
WS.say(x);
});
WS.sensorOn('myoOrientation', .15, function (data) {
@drGrove
drGrove / glass.html
Created March 24, 2014 22:10
[wearscript] Myo Hue
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0; background: #000;">
<script data-require="jquery" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
function server() {
WS.say('Welcome to Wearscript Hue Glass Demo')
WS.log('Welcome to Wearscript Hue Glass Demo')
var numHue = 3;
function updateHue( hueState ){
@drGrove
drGrove / glass.html
Created March 25, 2014 23:50
[wearscript] Crazyflie Glass Driver
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
<script data-require="jquery" data-semver="2.0.3" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
WS.log('Wearscript CrazyFlie Driver');
@drGrove
drGrove / capscr.sh
Created March 29, 2014 00:57
Capscr
#!/bin/bash
timestamp="$(date +%y%m%d%H%M%S)"
targetbase="$HOME/capscr"
mkdir -p $targetbase
[ -d $targetbase ] || exit 1
import $targetbase/$timestamp.png