Skip to content

Instantly share code, notes, and snippets.

View rwaldron's full-sized avatar

Rick Waldron rwaldron

  • Boston, MA
View GitHub Profile
@rwaldron
rwaldron / patch.ino
Last active August 29, 2015 14:06 — forked from sgk/patch.ino
#include <Process.h>
void setup() {
Bridge.begin();
Serial.begin(9600);
while (!Serial)
;
Serial.println("Invoking patch script on Yun.");
@rwaldron
rwaldron / pot.js
Last active August 29, 2015 14:07 — forked from jochasinga/pot.js
// Require modules
var Firebase = require("firebase");
var five = require("johnny-five");
// Create a new instance of Firebase db
var firebaseRef = new Firebase(
// Fictional URL: replace this with your own from firebase
"https://burning-limbo-666.firebaseio.com/colors"
);
@rwaldron
rwaldron / es5-sampler.js
Created October 28, 2014 18:11
Sampler class
// This version cannot protect its internal
// data from external tampering.
function Sampler(expect) {
this.values = new Array();
this.expect = expect;
}
Sampler.prototype.add = function(value) {
var length = this.values.length;
@rwaldron
rwaldron / pid.js
Created November 6, 2014 21:44
PID
require("es6-shim");
var priv = new Map();
// * (P)roportional
// * (I)ntegral
// * (D)erivative
function PID(opts) {
var state = {
@rwaldron
rwaldron / transfer.js
Last active August 29, 2015 14:09
Transfer local files to Intel Galileo
// npm install gaze moment minimist
var gaze = require("gaze");
var exec = require("child_process").exec;
var moment = require("moment");
var argv = require("minimist")(process.argv.slice(2));
var address = argv.i || "192.168.2.2";
var path = argv.p || "";
var blacklist = ["foo.js"];
@rwaldron
rwaldron / skipper-robot-dog.md
Created November 21, 2014 02:32
Skipper and Barbie produce advancements in AI and Robotics

@rwaldron
rwaldron / barber-after-school.md
Last active August 29, 2015 14:10
Barbie's After School Program

@rwaldron
rwaldron / bt-select.js
Created December 9, 2014 19:09
Select from multiple available Bluetooth Serial connections
var prompt = require("prompt");
var serialport = require("serialport");
var five = require("johnny-five");
prompt.start();
serialport.list(function(err, ports) {
var bts = btPorts(ports);
console.log("Select a port: ");
@rwaldron
rwaldron / imp.js
Last active August 29, 2015 14:11
Alternate Light Bot programs
var Imp = require("imp-io");
var five = require("johnny-five");
var Sumobot = require("sumobot")(five);
var board = new five.Board({
io: new Imp({
agent: "agent id"
})
});
(1) node_modules/aws-sdk/lib/util.js, L609
Object.defineProperty(err, 'name', {writable: true, enumerable: false});
(2) node_modules/aws-sdk/lib/util.js, L676
enumerable: false, writable: true, configurable: true });
(3) node_modules/bluebird/js/browser/bluebird.js, L729
enumerable: false,
(4) node_modules/bluebird/js/browser/bluebird.js, L5156