Skip to content

Instantly share code, notes, and snippets.

View zankich's full-sized avatar

Adrian Zankich zankich

View GitHub Profile
var Cylon = require('cylon');
Cylon.robot({
connection: { name: 'sphero', adaptor: 'sphero', port: '/dev/rfcomm0' },
device: { name: 'sphero', driver: 'sphero' },
red: 0,
green: 0,
blue: 255,
shakePower: 0,
currentLevel: 0,
var Cylon = require('cylon');
Cylon.robot({
connections: {
arduino: { adaptor: 'firmata', port: '/dev/tty.usbmodem1411' },
skynet: { adaptor: 'skynet', uuid: "db895340-c344-11e4-9f09-df7578d68eac", token: "d0a9f0d7e321657a38d25dd492492ffed0baf773" }
},
work: function(my) {
my.skynet.on('message', function(data) {
data.forEach(function(o) {
@zankich
zankich / 1.js
Last active August 29, 2015 14:16 — forked from chrismatthieu/1.js
// curl -X POST -d '{"devices": "db895340-c344-11e4-9f09-df7578d68eac", "payload": [{"pin":9, "mode":1, "value":1}, {"pin":13, "mode":1, "value":1}]}' http://meshblu.octoblu.com/messages --header "meshblu_auth_uuid: db895340-c344-11e4-9f09-df7578d68eac" --header "meshblu_auth_token: d0a9f0d7e321657a38d25dd492492ffed0baf773"
var Cylon = require('cylon');
Cylon.robot({
connections: {
arduino: { adaptor: 'firmata', port: '/dev/tty.usbmodem1411' },
skynet: { adaptor: 'skynet', uuid: "db895340-c344-11e4-9f09-df7578d68eac", token: "d0a9f0d7e321657a38d25dd492492ffed0baf773" }
},
@zankich
zankich / dualshock3.json
Created April 7, 2015 20:50
go miami presentation
{
"name": "Sony PLAYSTATION(R)3 Controller",
"guid": "030000004c0500006802000011010000",
"axis": [
{
"name": "left_x",
"id": 0
},
{
"name": "left_y",
@zankich
zankich / 01-firmata_blink.go
Last active September 4, 2015 03:30
O'Reilly Gobot Webcast 2015
"use strict";
var bebop = require("../.");
var drone = bebop.createClient();
drone.connect();
drone.on("battery", function(data) {
console.log("percentage: ", data);
@zankich
zankich / bbb_connect.sh
Last active April 1, 2019 10:56
connect to your beaglebone black using the usb->ethernet and forward the internet from your host computer to the beaglebone black
#!/bin/bash
#
# run this script on your linux host computer to connect to the bbb and forward your internet.
# be sure to replace "enp0s20u1" with the appropriate usb device for your bbb, which can be found
# by doing an "ifconfig" on your host computer.
#
sudo -- sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
@zankich
zankich / 01-getting_started.md
Last active May 2, 2019 01:42
Gophercon getting started with Gobot

First go to the Gobot Intel Edison Readme (https://github.com/hybridgroup/gobot/tree/master/platforms/intel-iot/edison#how-to-install) and follow the getting started guide. Your Edison has already been updated to the latest firmware version,
so you can skip that part! You will not need to download the Intel XDK, you only need to go through the steps detailing how to connect through the serial interface and then configure your edison.

Find the box called "Base Shield" and open that up and place the grove "Base Shield" onto your Intel Edison. This will allow you to use the Grove connectors shields and cables!

@zankich
zankich / build.sh
Created April 21, 2016 18:47
script for building consul and consul-template with docker
#!/bin/bash -exu
##
## This script generates consul and consul-template binaries.
## You may run this from inside a docker container with:
##
## docker pull golang:1.6.1
## docker run -v $PWD:/opt/build -t golang:1.6.1 /opt/build/build.sh
##