Skip to content

Instantly share code, notes, and snippets.

View zankich's full-sized avatar

Adrian Zankich zankich

View GitHub Profile
//leap_sphero.js
var Cylon = require('cylon');
Cylon.robot({
connections: [
{ name: 'leapmotion', adaptor: 'leapmotion', port: '127.0.0.1:6437' },
{ name: 'sphero', adaptor: 'sphero', port: '/dev/rfcomm0' }
],
devices: [
{ name: 'leapmotion', driver: 'leapmotion', connection: 'leapmotion' },
var Cylon = require('cylon');
Cylon.robot({
connections: [
{ name: 'joystick', adaptor: 'joystick', controller: 'dualshock3' },
{ name: 'sphero', adaptor: 'sphero', port: '/dev/rfcomm0' }
],
devices: [
{ name: 'controller', driver: 'dualshock3' },
{ name: 'sphero', driver: 'sphero', connection: 'sphero' }
var Cylon = require('cylon');
Cylon.api({host: '10.22.25.22', port: '8080', ssl: false});
Cylon.robot({
name: 'pebble',
connection: { name: 'pebble', adaptor: 'pebble' },
device: { name: 'pebble', driver: 'pebble' },
work: function(my) {
var DRobot = (function(){
function DRobot(){};
D.prototype.device = {name: "drone", driver: "ardrone"};
return DRobot;
})();
var drone = [
{name: "wedge", port: "192.168.0.10"},
{name: "biggs", port: "192.168.0.11"}
];
var Cylon = require('cylon');
Cylon.api({ host: '0.0.0.0', port: '8080' });
var MyRobot = (function() {
function MyRobot() {}
MyRobot.prototype.connection = {name: "drone", adaptor: "ardrone", port: "192.168.1.1"};
MyRobot.prototype.device = {name: "drone", driver: "ardrone"};
MyRobot.prototype.commands = ["relax", "energize"];
var Cylon = require('cylon');
var rest = require('restler');
var haarcascade = "" + __dirname + "/haarcascade_frontalface_alt.xml";
var DroneRobot = (function(){
function DroneRobot() {}
DroneRobot.prototype.commands = ["faceOff"];
var Cylon = require('cylon');
var rest = require('restler');
var haarcascade = "" + __dirname + "/haarcascade_frontalface_alt.xml";
var DroneRobot = (function(){
function DroneRobot() {}
DroneRobot.prototype.commands = ["faceOff"];
  • connect to bbb
    • $ sudo apt-get install gccgo
    • $ go build -compiler=gccgo -gccgoflags='-static' digi_blink.go
    • $ mv digi_blink /tmp/
  • connect to drone wifi
    • $ telnet 192.168.1.1
    • $ vi /etc/usb.ids
    • add to file
1781 digispark 
package main
import (
"fmt"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot-firmata"
"github.com/hybridgroup/gobot-gpio"
)
func main() {
@zankich
zankich / steps.md
Last active July 24, 2018 18:02
Gobot firmata instructions for Windows
  1. Install gort
  1. Install arduino dependencies and flash firmata
  • Make sure you are running your terminal as an Administrator
  • $ ./gort arduino install
  • reload your env variables, or close your cmd prompt and open a new one
  • $ ./gort scan serial
  • Take note of the COM port listed, this should be your arduino