View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function btsend(data) { | |
var addr = '00:00:12:06:57:19'; | |
WS.bluetoothPair(addr, function () { | |
WS.log('Sending: ' + data); | |
WS.bluetoothWrite(addr, data); | |
}); | |
} |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000"> | |
<script> | |
function server() { | |
WS.beaconOn(); | |
WS.subscribe('ibeacon', function (channel, uuid, rssid, major, minor, proximity) { | |
WS.log(channel + ' ' + uuid + ' ' + rssid + ' ' + major + ' ' + minor + ' ' + proximity); | |
WS.say(proximity) | |
}) | |
} |
View arduino.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(3, 2); // RX, TX | |
unsigned long timeOff = 0; | |
void setup() | |
{ | |
Serial.begin(57600); | |
while (!Serial) { |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<head> | |
<script src="https://gist.githubusercontent.com/amiller/11100038/raw/pacman.js"></script> | |
<!-- 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"> | |
<div id="pacman"></div> | |
<canvas id="canvas" width="640" height="360" style="display:block"></canvas> |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
function main() { | |
var fs = "1111:01|01|01|01*011|110:010|011|001*110|011:001|011|010*111|010:01|11|01:010|111:10|11|10*11|11*010|010|011:111|100:11|01|01:001|111*01|01|11:100|111:11|10|10:111|001", now = [3,0], pos = [4,0]; | |
var gP = function(x,y) { return document.querySelector('[data-y="'+y+'"] [data-x="'+x+'"]'); }; | |
var draw = function(ch, cls) { | |
var f = fs.split('*')[now[0]].split(':')[now[1]].split('|').map(function(a){return a.split('')}); | |
for(var y=0; y<f.length; y++) | |
for(var x=0; x<f[y].length; x++) |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function main() { | |
if (WS.scriptVersion(1)) return; | |
} | |
window.onload = main; | |
</script></body></html> |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000"> | |
<script> | |
function server() { | |
WS.gestureCallback('onGestureTAP', function () { | |
WS.publish('say', 'Tapped'); | |
}); | |
} | |
function main() { | |
if (WS.scriptVersion(1)) return; |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
function main() { | |
var fs = "1111:01|01|01|01*011|110:010|011|001*110|011:001|011|010*111|010:01|11|01:010|111:10|11|10*11|11*010|010|011:111|100:11|01|01:001|111*01|01|11:100|111:11|10|10:111|001", now = [3,0], pos = [4,0]; | |
var gP = function(x,y) { return document.querySelector('[data-y="'+y+'"] [data-x="'+x+'"]'); }; | |
var draw = function(ch, cls) { | |
var f = fs.split('*')[now[0]].split(':')[now[1]].split('|').map(function(a){return a.split('')}); | |
for(var y=0; y<f.length; y++) | |
for(var x=0; x<f[y].length; x++) |
View cpu.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
JSNES, based on Jamie Sanders' vNES | |
Copyright (C) 2010 Ben Firshman | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
View glass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0" bgcolor="#000"> | |
<script> | |
function main() { | |
if (WS.scriptVersion(1)) return; | |
WS.picarusARTagFactory(function (model) { | |
model.processStream(function (tags) { | |
WS.log(JSON.stringify(tags)); | |
var out = 'Tag'; | |
for (var i = 0; i < tags.length; i++) |
NewerOlder