Skip to content

Instantly share code, notes, and snippets.

View zankich's full-sized avatar

Adrian Zankich zankich

View GitHub Profile
@zankich
zankich / bbb_ubuntu.md
Last active August 29, 2015 13:57
Beaglebone Black Ubuntu 13.10 Install instructions

####Installation instructions

  • You will need node.js as well as satisfying the dependencies listed here
  • Once you have the required dependencies met, you can install the required node modules with
    $ npm install cylon cylon-gpio cylon-i2c cylon-firmata cylon-sphero cylon-leapmotion
  • Install the leap motion software and sdk

####Arduino blink

//blink.js
var Cylon = require('cylon');

####Installation instructions

  • You will need node.js as well as satisfying the dependencies listed here
  • Once you have the required dependencies met, you can install the required node modules with
    $ npm install cylon cylon-gpio cylon-i2c cylon-firmata cylon-sphero cylon-leapmotion
  • Install the leap motion software (and SDK too if you want, but the SDK is not needed for cylon.js)

####Arduino blink

//blink.js
var Cylon = require('cylon');
@zankich
zankich / main.go
Last active August 29, 2015 13:58
Exported/Unexported functions and fields
Your project layout should be
./main.go
./myProject/myProject.go
then run the program with
$ go run main.go
If you comment out lines 11 and 12 of main.go, then the program will execute correctly
package main
import (
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot-firmata"
"github.com/hybridgroup/gobot-gpio"
"github.com/hybridgroup/gobot-sphero"
"time"
)
//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"];