Skip to content

Instantly share code, notes, and snippets.

View Sumo.js
var five = require("johnny-five");
board = new five.Board({
// port: "/dev/rfcomm1"
port: "/dev/tty.NodeBot-DevB"
board.on("ready", function() {
(new five.Led(13)).strobe(500);
garrows / Sumo.ino
Created Jul 16, 2014
Sumo Bot Code
View Sumo.ino
#include <ZumoBuzzer.h>
#include <ZumoMotors.h>
#include <Pushbutton.h>
#include <QTRSensors.h>
#include <ZumoReflectanceSensorArray.h>
#define LED 13
// this might need to be tuned for different lighting conditions, surfaces, etc.
View gist:b006c1194797e88abcb4
### Keybase proof
I hereby claim:
* I am garrows on github.
* I am garrows ( on keybase.
* I have a public key whose fingerprint is 0A4E 7772 7EB5 DBA9 B1F7 1DE8 5565 4B63 238A B2F9
To claim this, I am signing this object:
garrows / SetupBluetooth.ino
Last active Feb 2, 2021
Configure HC-06 bluetooth chip to work with the Johnny-Five javascript robotics library
View SetupBluetooth.ino
This is for configuring the hc-06 bluetooth chip to work with Johnny-Five javascript robotics library.
Might also work with the hc-05.
Author: Glen Arrowsmith (@garrows)
#define ROBOT_NAME "RandomBot"
garrows /
Last active Aug 29, 2015
Debugging Gaffa

Debugging Gaffa

Inspect element. Click it. The selected element is now $0 in the javascript console

garrows / gulpfile.js
Last active Aug 29, 2015
Gulp watch with LiveReload
View gulpfile.js
var gulp = require('gulp'),
compress = require('gulp-uglify'),
stylus = require('gulp-stylus'),
concat = require('gulp-concat'),
browserify = require('gulp-browserify'),
livereload = require('gulp-livereload');
var liveReloadServer = livereload();
gulp.task('styles', function() {
garrows / ProxyEventer.js
Last active Dec 24, 2015
Simple proxy and event listener
View ProxyEventer.js
MyObject.prototype.on = function (eventName, callback) {
if (this.eventListeners[eventName] == undefined) {
this.eventListeners[eventName] = [];
if (typeof callback == "function") {
} else {
throw "can not subscribe with a non function callback";