Skip to content

Instantly share code, notes, and snippets.

View deadprogram's full-sized avatar
💭
Currently available for work. Let's talk!

Ron Evans deadprogram

💭
Currently available for work. Let's talk!
View GitHub Profile
@deadprogram
deadprogram / 01-firmata_blink.go
Last active September 4, 2015 03:30 — forked from zankich/01-firmata_blink.go
O'Reilly Gobot Webcast 2015
@deadprogram
deadprogram / bbb_connect.sh
Last active September 4, 2015 03:28 — forked from zankich/bbb_connect.sh
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
@deadprogram
deadprogram / 01-getting_started.md
Last active September 4, 2015 03:28 — forked from zankich/01-getting_started.md
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!

var Cylon = require('cylon');
Cylon.robot({
connections: { bluetooth: {adaptor: 'central', uuid: 'd03972a493da', module: 'cylon-ble'}},
devices: {mip: {driver: 'mip'}},
work: function(my) {
my.mip.setHeadLED(2, 2, 2, 2);
after((2).seconds(), function() {
my.mip.setGameMode(my.mip.Games.Dance);
@deadprogram
deadprogram / temp-sense.js
Created July 11, 2015 22:33
temp-sense.js
var Cylon = require("cylon");
Cylon.robot({
connections: {
edison: { adaptor: "intel-iot" }
},
devices: {
temp: { driver: "upm-grovetemp", pin: 0, connection: "edison" },
servo: { driver: "servo", pin: 9, connection: "edison" },
},
var Cylon = require('cylon');
Cylon.api({
host: '0.0.0.0',
port: '7000',
ssl: false
});
Cylon.robot({
name: 'drenerdo',
Setting top to : /tmp/tmppB99wx
Setting out to : /tmp/tmppB99wx/build
Found Pebble SDK for basalt in: : /app/sdk3/Pebble/basalt
Checking for program gcc,cc : arm-none-eabi-gcc
Checking for program ar : arm-none-eabi-ar
Found Pebble SDK for aplite in: : /app/sdk3/Pebble/aplite
Checking for program gcc,cc : arm-none-eabi-gcc
Checking for program ar : arm-none-eabi-ar
'configure' finished successfully (0.136s)
Waf: Entering directory `/tmp/tmppB99wx/build'
"use strict";
var Cylon = require("cylon");
function rgbToHex(red, green, blue) {
return blue | (green << 8) | (red << 16);
};
function convertWave(value) {
// color will be between 0 and 100
var Cylon = require('cylon');
Cylon.api("http", {host: "0.0.0.0", ssl: false});
Cylon.robot({
name: 'mip',
connections: {
bluetooth: {adaptor: 'central', uuid: 'd03972cbc812', module: 'cylon-ble'},
keyboard: {adaptor: 'keyboard'}
},
var DBus = require('dbus');
var dbus = new DBus();
var bus = dbus.getBus('system');
bus.getInterface('com.devicehive.cloud',
'/com/devicehive/cloud',
'com.devicehive.cloud',
function(err, iface) {
console.log("hi");
iface.on('CommandReceived', function(data) {