Giter Club home page Giter Club logo

cylon-sphero's Introduction

Cylon.js For Sphero

Cylon.js (http://cylonjs.com) is a JavaScript framework for robotics, physical computing, and the Internet of Things (IoT).

This module provides an adaptor/driver for the Sphero robot from Orbotix (http://www.gosphero.com/). It uses the Sphero.js module (https://github.com/orbotix/sphero.js) from @orbotix thank you!

Want to use Ruby on robots? Check out our sister project Artoo (http://artoo.io)

Want to use the Go programming language to power your robots? Check out our sister project Gobot (http://gobot.io).

Build Status Code Climate Test Coverage

How to Install

Install the module with:

$ npm install cylon cylon-sphero

How to Use

Example of a simple program that makes the Sphero roll.

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    sphero: { adaptor: 'sphero', port: '/dev/rfcomm0' }
  },

  devices: {
    sphero: { driver: 'sphero' }
  },

  work: function(my) {
    every((1).second(), function() {
      my.sphero.roll(60, Math.floor(Math.random() * 360));
    });
  }
}).start();

How to Connect

OSX

In order to allow Cylon.js running on your Mac to access the Sphero, go to "Bluetooth > Open Bluetooth Preferences > Sharing Setup" and make sure that "Bluetooth Sharing" is checked.

Thank you to @kopipejst for the above connnection info.

First pair your computer and Sphero. You can do this using bluetooth preferences. (Sphero won't stay connected)

Find out serial port address by running this command:

ls /dev/tty.Sphero*

The port will look something like this:

/dev/tty.Sphero-BBP-AMP-SPP

Now you are ready to run the example code, be sure to update this line with the correct port:

connections: {
  sphero: { adaptor: "sphero", port: "/dev/tty.Sphero-BBP-AMP-SPP" }
},

Linux

Connecting to the Sphero from Ubuntu or any other Linux-based OS can be done entirely from the command line using CylonJS CLI commands. Here are the steps.

Ubuntu

Find the address of the Sphero, by using:

gort bluetooth scan

Pair to Sphero using this command (substituting the actual address of your Sphero):

gort bluetooth pair <address>

Connect to the Sphero using this command (substituting the actual address of your Sphero):

gort bluetooth connect <address>

Fedora

Find the address of the Sphero, by using:

hcitool scan

Assuming you've already paired the Sphero through Fedora's bluetooth settings, connect the Sphero using the following command (substituting the actual address of your Sphero):

rfcomm connect 0 <address> 1

This will connect the Sphero to /dev/rfcomm0 as long as the command is running.

Windows

You should be able to simply pair your Sphero using your normal system tray applet for Bluetooth, and then connect to the COM port that is bound to the device, such as COM3.

Compatibility

The cylon-sphero module is currently compatible with Node.js versions 0.10.x thru 5.x.

In order to install it with Node.js 5.x+, you will need to have g++ v4.8 or higher.

How To Calibrate Sphero

You might want to calibrate the orientation of the Sphero so that it is pointed 'forward'. There are 2 functions that have been added to the Sphero driver to help with this.

Call startCalibration() to put the Sphero into 'calibration mode' by turning on the tail LED and turning off the auto-stablization. You can now manually turn the Sphero to so the tail LED is pointed to the rear of the direction in which you want the Sphero to go.

Call finishCalibration() to turn off 'calibration mode' by turning off the tail LED and turning back on the auto-stablization. Whichever direction that the tail LED was pointed, is now the rear direction for the Sphero.

Documentation

We're busy adding documentation to our web site at http://cylonjs.com/ please check there as we continue to work on Cylon.js

Thank you!

Contributing

For our contribution guidelines, please go to https://github.com/hybridgroup/cylon/blob/master/CONTRIBUTING.md .

Release History

For the release history, please go to https://github.com/hybridgroup/cylon-sphero/blob/master/RELEASES.md .

License

Copyright (c) 2013-2015 The Hybrid Group. Licensed under the Apache 2.0 license.

cylon-sphero's People

Contributors

bmidgley avatar caleboller avatar chrisfp avatar deadprogram avatar edgarsilva avatar jaywengrow avatar juliancheal avatar mcollina avatar palmerabollo avatar perrydunnit avatar rafmagana avatar stewart avatar xixebombilla avatar zankavrogin avatar zankich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cylon-sphero's Issues

readLocator doesn't return position

I'm trying to get the location of the Sphero by using readLocator(). I can't seem to get a proper return.

I tried the following to try and find out what is returned by readLocator:

Cylon.robot
  connection: { name: 'sphero', adaptor: 'sphero', port: '/dev/tty.Sphero-BRB-RN-SPP' }
  device: { name: 'sphero', driver: 'sphero' }


  work: (me) ->

    me.sphero.on 'connect', ->
      console.log "Connecting"
      me.sphero.setDataStreaming 30, 1, 21, 50, 25
      me.sphero.configureLocator 1, 10, 10, 150
      console.log "initial: " + locator()

    every 5.seconds(), ->
      console.log "Object type: " + Object.prototype.toString.call(locator())
      console.log locator()

    locator = ->
      currentLocation = me.sphero.readLocator()
      console.log "Locator type: " + Object.prototype.toString.call(currentLocation)
      console.log "Locator pos:"+Object.keys(currentLocation)
      "Location is: #{currentLocation}"
.start()

Which results in:


initial: Location is: [object Object]
Locator type: [object Object]
Locator pos:domain,_events,_maxListeners,resetTimeout,requestAcknowledgement,open,close,write,ping,getVersioning,_controlUARTTxLine,setDeviceName,getBluetoothInfo,setAutoReconnect,getAutoReconnect,getPowerState,setPowerNotification,sleep,getVoltageTripPoints,_setVoltageTripPoints,setInactivityTimeout,_jumpToBootloader,performLevel1Diagnostics,performLevel2Diagnostics,_clearCounters,assignTimeValue,pollPacketTimes,setHeading,setStabilization,setRotationRate,setApplicationConfigurationBlock,getApplicationConfigurationBlock,getChassisID,_setChassisID,selfLevel,setDataStreaming,configureCollisionDetection,configureLocator,setAccelerometerRange,readLocator,setRGB,setBackLED,getRGB,roll,setBoostWithTime,setRawMotorValues,setMotionTimeout,setPermanentOptionFlags,getPermanentOptionFlags,setTemporaryOptionFlags,getTemporaryOptionFlags,getConfigurationBlock,setDeviceMode,setConfigurationBlock,getDeviceMode,runMacro,saveTemporaryMacro,saveMacro,reInitializeMacroExecutive,abortMacro,getMacroStatus,setMacroParameter,appendMacroChunck,eraseOrbBasicStorage,appendOrbBasicFragment,executeOrbBasicProgram,abortOrbBasicProgram,submitValueToInputStatement
Object type: [object String]

Any ideas on how to get the positions returned from readLocator?

Pairing Sphero with OSX

I tried running the example Sphero app and had no luck. The program exits without error (see output below).

I'm not actually convinced that a Sphero connection exists. I have Bluetooth sharing turned on in my Sharing settings, and can pair the Sphero with my Mac in the Bluetooth settings, but the Sphero never exits it's 3-color blinking mode. Plus, the paring only lasts a few seconds. I can pair Sphero to an iPhone with no problems, but the paring just won't stick in OSX (10.9.3). Am I missing something?

Erics-MacBook-Pro:sparktest$ node spherotest.js
I, [2014-06-26T22:10:42.423Z]  INFO -- : Initializing connections.
I, [2014-06-26T22:10:42.425Z]  INFO -- : Initializing connection 'sphero'.
D, [2014-06-26T22:10:42.425Z] DEBUG -- : Loading adaptor 'sphero'.
I, [2014-06-26T22:10:42.461Z]  INFO -- : Registering Sphero adaptor for Robot 416
I, [2014-06-26T22:10:42.461Z]  INFO -- : Registering Sphero driver for Robot 416
I, [2014-06-26T22:10:42.462Z]  INFO -- : Initializing devices.
I, [2014-06-26T22:10:42.462Z]  INFO -- : Initializing device 'sphero'.
D, [2014-06-26T22:10:42.462Z] DEBUG -- : Loading driver 'sphero'.
I, [2014-06-26T22:10:42.462Z]  INFO -- : Starting connections.
I, [2014-06-26T22:10:42.463Z]  INFO -- : Connecting to 'sphero' on port /dev/rfcomm0.
I, [2014-06-26T22:10:42.463Z]  INFO -- : Connecting to Sphero 'sphero'...
Erics-MacBook-Pro:sparktest$

Cannot find 'cylon-sphero' module.

I am running the basic.js code from the repository and running into this error: Cannot find the 'cylon-sphero' module.

The basic.js code looks like this:
"use strict";

var Cylon = require("cylon");

Cylon.robot({
connections: {
sphero: { adaptor: "sphero", port: "/dev/tty.Sphero-YWY-AMP-SPP" }
},

devices: {
sphero: { driver: "sphero" }
},

work: function(me) {
every((1).second(), function() {
me.sphero.roll(60, Math.floor(Math.random() * 360));
});
}
}).start();

locator cannot be used to get xpos,ypos

I've tried every method I can find to get locator to work.

  1. readLocator calls the callback without xpos or ypos. err,data is:
null, { sop1: 255,
  sop2: 255,
  mrsp: 4,
  seq: 59,
  dlen: 1,
  data: <Buffer >,
  checksum: 191 }
  1. my.sphero.setDataStreaming called with
    n: 400, m: 1, pcnt: 0, dataSources: ['locator', 'accelOne', 'velocity', 'accelerometer']

on dataStreaming gets called with data objects that do not have xpos or ypos either:

{ desc: 'Sensor Data Streaming',
  idCode: 3,
  event: 'dataStreaming',
  did: 2,
  cid: 17,
  packet: 
   { sop1: 255,
     sop2: 254,
     idCode: 3,
     dlenMsb: 0,
     dlenLsb: 13,
     dlen: 13,
     data: <Buffer ff 69 00 9b 0f dd 00 63 00 00 00 00>,
     checksum: 157 },
  xAccel: 
   { sensor: 'accelerometer axis X, filtered',
     range: { bottom: -32768, top: 32767 },
     units: '1/4096 G',
     value: [ -151 ] },
  yAccel: 
   { sensor: 'accelerometer axis Y, filtered',
     range: { bottom: -32768, top: 32767 },
     units: '1/4096 G',
     value: [ 155 ] },
  zAccel: 
   { sensor: 'accelerometer axis Z, filtered',
     range: { bottom: -32768, top: 32767 },
     units: '1/4096 G',
     value: [ 4061 ] },
  accelOne: 
   { sensor: 'acceleration one',
     range: { bottom: 0, top: 8000 },
     units: '1mG',
     value: [ 99 ] },
  xVelocity: 
   { sensor: 'velocity X',
     range: { bottom: -32768, top: 32767 },
     units: 'mm/s',
     value: [ 0 ] },
  yVelocity: 
   { sensor: 'velocity Y',
     range: { bottom: -32768, top: 32767 },
     units: 'mm/s',
     value: [ 0 ] } }
  1. finally, the on locator callback is never called.

my code for reference:

var Cylon;

Cylon = require('cylon');

Cylon.robot({
  connections: {
    sphero: {
      adaptor: 'sphero',
      port: '/dev/rfcomm0'
    }
  },
  devices: {
    sphero: {
      driver: 'sphero'
    }
  },
  work: function(my) {
    var a, color;
    a = {};
    color = [0, 0, 0];
    my.sphero.on("locator", function(data, d2) {
      return console.log("onlocator", data, d2);
    });
    my.sphero.detectCollisions();
    my.sphero.setBackLed(192);
    my.sphero.setDataStreaming({
      n: 400,
      m: 1,
      pcnt: 0,
      dataSources: ['locator', 'accelOne', 'velocity', 'accelerometer']
    });
    my.sphero.configureLocator({
      flags: 0,
      x: 0,
      y: 0,
      yawTare: 0
    }, function(err, data) {
      return console.log("configure", err, data);
    });
    my.sphero.on("dataStreaming", function(data) {
      console.log(data);
      a.x = data.xAccel.value[0];
      a.y = data.yAccel.value[0];
      a.z = data.zAccel.value[0];
      a.one = data.accelOne.value[0];
      if (a.z > 8000) {
        return color[1] = 240;
      }
    });
    my.sphero.on("collision", function() {
      return color[0] = 240;
    });
    return every(5..second(), function() {
      var direction, shade;
      my.sphero.readLocator(function(err, data) {
        return console.log("readlocator", err, data);
      });
      shade = color[0] << 16 | color[1] << 8 | color[2];
      my.sphero.color(shade);
      if (color[0] > 0) {
        color[0] -= 10;
      }
      if (color[1] > 0) {
        color[1] -= 10;
      }
      if (color[2] > 0) {
        color[2] -= 10;
      }
      if (shade === 0) {
        direction = ((new Date()).getTime() / 100) % 360;
        return my.sphero.roll(60, direction * 0);
      } else {
        return my.sphero.stop();
      }
    });
  }
});

Cylon.start();

I checked and the examples for using location aren't showing locations. Callbacks get objects that never contain xpos or ypos

debian@beaglebone:/usr/local/lib/node_modules/cylon-sphero/examples/locator$ node fluent-locator.js
I, [2015-09-13T19:36:19.220Z] INFO -- : [Robot 1] - Starting connections.
I, [2015-09-13T19:36:19.239Z] INFO -- : Connecting to Sphero 'sphero'...
I, [2015-09-13T19:36:21.230Z] INFO -- : [Robot 1] - Starting devices.
I, [2015-09-13T19:36:21.403Z] INFO -- : [Robot 1] - Working.
Setting up Collision Detection...

data:
{ desc: 'Sensor Data Streaming',
  idCode: 3,
  event: 'dataStreaming',
  did: 2,
  cid: 17,
  packet: 
   { sop1: 255,
     sop2: 254,
     idCode: 3,
     dlenMsb: 0,
     dlenLsb: 7,
     dlen: 7,
     data: <Buffer 00 64 00 00 00 00>,
     checksum: 145 },
  accelOne: 
   { sensor: 'acceleration one',
     range: { bottom: 0, top: 8000 },
     units: '1mG',
     value: [ 100 ] },
  xVelocity: 
   { sensor: 'velocity X',
     range: { bottom: -32768, top: 32767 },
     units: 'mm/s',
     value: [ 0 ] },
  yVelocity: 
   { sensor: 'velocity Y',
     range: { bottom: -32768, top: 32767 },
     units: 'mm/s',
     value: [ 0 ] } }

...

debian@beaglebone:/usr/local/lib/node_modules/cylon-sphero/examples/locator$ node locator.js
I, [2015-09-13T19:38:12.525Z] INFO -- : [Robot 1] - Starting connections.
I, [2015-09-13T19:38:12.545Z] INFO -- : Connecting to Sphero 'sphero'...
I, [2015-09-13T19:38:17.939Z] INFO -- : [Robot 1] - Starting devices.
I, [2015-09-13T19:38:18.122Z] INFO -- : [Robot 1] - Working.
Setting up Collision Detection...

dataStreaming:
{ desc: 'Sensor Data Streaming',
  idCode: 3,
  event: 'dataStreaming',
  did: 2,
  cid: 17,
  packet: 
   { sop1: 255,
     sop2: 254,
     idCode: 3,
     dlenMsb: 0,
     dlenLsb: 7,
     dlen: 7,
     data: <Buffer 00 65 00 00 00 00>,
     checksum: 144 },
  accelOne: 
   { sensor: 'acceleration one',
     range: { bottom: 0, top: 8000 },
     units: '1mG',
     value: [ 101 ] },
  xVelocity: 
   { sensor: 'velocity X',
     range: { bottom: -32768, top: 32767 },
     units: 'mm/s',
     value: [ 0 ] },
  yVelocity: 
   { sensor: 'velocity Y',
     range: { bottom: -32768, top: 32767 },
     units: 'mm/s',
     value: [ 0 ] } }

...

Multiple work-functions in a row

Hi!

Is it possible to define a Cylon.robot which connects to the Sphero and calls the work-function on start, and afterwards send new commands (which were not in the work-function) without having to reconnect (i.e. make a new Cylon.robot)?

An example:

var Sphero = Cylon.robot({
  connections: {
    bluetooth: { adaptor: 'sphero', port: 'COM7' }
  },

  devices: {
    sphero: { driver: 'sphero' }
  },

  work: function(my) {
    //every((1).second(), function() {
      my.sphero.randomColor(function(err,data) {
      	if(err) {
      		console.log(err);
      	}
      	else {
      		console.log(data);
      	};
      });
  }
});

Sphero.start();

And after a while change the work-function again and call the new one.
My initial idea was to do something like this:

Sphero.work = function(my) { my.sphero.color('red') };
Sphero.start();

But this does not seem to work. Thanks in advance!

Default installation fails - Namespace part 'Adaptor' can not be created

The basic Spheron usage works out of the box, so I know I can connect to the Sphero, etc. Any idea how to correct this?
My basic code:

var Cylon = require('cylon');

Cylon.robot({
  connection: { name: 'sphero', adaptor: 'sphero', port: '/dev/cu.Sphero-PYW-AMP-SPP' },
  device: {name: 'sphero', driver: 'sphero'},

  work: function(my) {
    every((1).second(), function() { 
      my.sphero.roll(60, Math.floor(Math.random() * 360));
    });
  }
}).start();

The error

reidcarlbe-ltm3:sphero1 reid.carlberg$ node sphero1.js 
Initializing connections...
Initializing connection 'sphero'...
Loading adaptor 'sphero'

/Users/reid.carlberg/Projects/sphero1/node_modules/cylon-sphero/node_modules/node-namespace/lib/namespace.js:21
        throw new Error("Namespace part '" + name + "' can not be created");
              ^
Error: Namespace part 'Adaptor' can not be created
    at _namespace (/Users/reid.carlberg/Projects/sphero1/node_modules/cylon-sphero/node_modules/node-namespace/lib/namespace.js:21:15)
    at _namespace (/Users/reid.carlberg/Projects/sphero1/node_modules/cylon-sphero/node_modules/node-namespace/lib/namespace.js:26:16)
    at Object.<anonymous> (/Users/reid.carlberg/Projects/sphero1/node_modules/cylon-sphero/dist/adaptor.js:24:3)
    at Object.<anonymous> (/Users/reid.carlberg/Projects/sphero1/node_modules/cylon-sphero/dist/adaptor.js:109:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)

Uncaught TypeError: Uncaught, unspecified "error" event.

I've tried to run example code but getting error:

Initializing connections...
Initializing connection 'sphero'...
Loading adaptor 'sphero'
Registering Sphero adaptor for Robot 17362
Registering Sphero driver for Robot 17362
Initializing devices...
Initializing device 'sphero'...
Loading driver 'sphero'
Starting connections...
Connecting to 'sphero' on port '/dev/rfcomm0'
Connecting to Sphero 'sphero'...
Starting devices...
Starting device 'sphero'
sphero started
events.js:2877: Uncaught TypeError: Uncaught, unspecified "error" event.

Sensor Streaming

Is there a method for getting Accelerometer and GyroScope data with Cylon Sphero ? I would like to use the Sphero as a controller, and the locator event doesn't return values for the properties that I can use.

Error: Serialport not open.

Hi,

I've tried to run example code but getting error:

Initializing connections...
Initializing connection 'sphero'...
Loading adaptor 'sphero'
Registering Sphero adaptor for Robot 86627
Registering Sphero driver for Robot 86627
Initializing devices...
Initializing device 'sphero'...
Loading driver 'sphero'
Starting connections...
Connecting to 'sphero' on port '/dev/tty.Sphero-YWR-AMP-SPP'
Connecting to Sphero 'sphero'...
Starting devices...
Starting device 'sphero'
sphero started

events.js:72
throw er; // Unhandled 'error' event
^
Error: Serialport not open.
at SerialPortFactory.SerialPort.write (/Users/user/node_modules/spheron/node_modules/serialport/serialport.js:246:17)
at EventEmitter._sphero.write (/Users/user/node_modules/spheron/lib/sphero.js:88:17)
at EventEmitter.roll (/Users/user/node_modules/spheron/lib/sphero.js:121:14)
at Sphero.base.(anonymous function) as roll
at Connection.base.(anonymous function) as roll
at Sphero.Sphero.roll (/Users/user/node_modules/cylon-sphero/dist/driver.js:61:32)
at Device.base.(anonymous function) as roll
at [object Object]. (/Users/user/node_modules/cylon-sphero/examples/sphero.coffee:11:26, :18:28)
at [object Object].wrapper as _onTimeout
at Timer.listOnTimeout as ontimeout

I'm using OSX 10.9.1. Same error if run under sudo. I have enabled "Bluetooth sharing"

sphero get disconnects by itself 30 seconds after start.

I'm using ubuntu 14-10. after installing using last version and basic.js example.
I get sphero connected, It starts moving but after 30 seconds it disconnects by itself.
I also tried cylon-neurosky and it runs without any issue.

Here is the output:
I, [2015-01-10T22:53:01.133Z] INFO -- : Initializing connections.
W, [2015-01-10T22:53:01.135Z] WARN -- : Specifying a single connection with the 'connection' key is deprecated, and will be removed in 1.0.0.
D, [2015-01-10T22:53:01.166Z] DEBUG -- : Registering module cylon-sphero
D, [2015-01-10T22:53:01.167Z] DEBUG -- : adaptors:
D, [2015-01-10T22:53:01.167Z] DEBUG -- : - sphero
D, [2015-01-10T22:53:01.167Z] DEBUG -- : drivers:
D, [2015-01-10T22:53:01.167Z] DEBUG -- : - sphero
I, [2015-01-10T22:53:01.168Z] INFO -- : Initializing devices.
W, [2015-01-10T22:53:01.168Z] WARN -- : Specifying a single device with the 'device' key is deprecated, and will be removed in 1.0.0.
I, [2015-01-10T22:53:01.170Z] INFO -- : Starting connections.
D, [2015-01-10T22:53:01.170Z] DEBUG -- : Starting connection 'sphero' on port /dev/rfcomm1.
I, [2015-01-10T22:53:01.170Z] INFO -- : Connecting to Sphero 'sphero'...
I, [2015-01-10T22:53:01.172Z] INFO -- : Starting devices.
D, [2015-01-10T22:53:01.172Z] DEBUG -- : Starting device 'sphero'.
I, [2015-01-10T22:53:01.173Z] INFO -- : Working.
Disconnect completed

If I look at syslog I can see:

kernel: [ 962.842138] Bluetooth: TIOCGSERIAL is not supported

I'm not certain if this issue becomes of cylon-sphero or Ubuntu.

Thanks

Program exits immediately

Hi, all I'm trying to do is get a "hello world" going. I tried months ago and gave up, but I decided to try again and hit the same wall. Everything looks good. No bad output, but the program does nothing. I tried following your bluetooth instructions but they didn't work exactly as you had them. Here's what I had to run:

$ gort scan bluetooth
Scanning ...
    68:86:E7:03:C0:E0   Sphero-BPO
$ gort bluetooth pair 68:86:E7:03:C0:E0 hci0
Release
New device (/org/bluez/775/hci0/dev_68_86_E7_03_C0_E0)
$ gort bluetooth connect 68:86:E7:03:C0:E0 hci0
Connected /dev/rfcomm0 to 68:86:E7:03:C0:E0
Press CTRL-C to disconnect

After that I tried running the following program:

var port = '/dev/rfcomm0';
var Cylon = require('cylon');

console.log('outside robot');
Cylon.robot({
  connection: { name: 'sphero', adaptor: 'sphero', port: port},
  device: { name: 'sphero', driver: 'sphero' },

  work: function(my) {
    console.log('in work');
    every((1).second(), function() {
      console.log('rolling');
      my.sphero.roll(60, Math.floor(Math.random() * 360));
    });
  }
}).start();

The only thing the prints is "outside robot". It outputs the following:
outside robot
I, [2014-10-08T02:40:07.167Z] INFO -- : Initializing connections.
I, [2014-10-08T02:40:07.167Z] INFO -- : Initializing connection 'sphero'.
D, [2014-10-08T02:40:07.167Z] DEBUG -- : Loading adaptor 'sphero'.
I, [2014-10-08T02:40:07.203Z] INFO -- : Registering Sphero adaptor for Robot 46939
I, [2014-10-08T02:40:07.203Z] INFO -- : Registering Sphero driver for Robot 46939
I, [2014-10-08T02:40:07.203Z] INFO -- : Initializing devices.
I, [2014-10-08T02:40:07.203Z] INFO -- : Initializing device 'sphero'.
D, [2014-10-08T02:40:07.204Z] DEBUG -- : Loading driver 'sphero'.
I, [2014-10-08T02:40:07.205Z] INFO -- : Starting connections.
I, [2014-10-08T02:40:07.205Z] INFO -- : Connecting to 'sphero' on port /org/biluez/775/hci0/dev_68_86_E7_03_C0_E0.
I, [2014-10-08T02:40:07.205Z] INFO -- : Connecting to Sphero 'sphero'...

I tried both ports in the file. There are no ports sphero related in /dev. By the way, I have a very similar program written in go that actually works (I used /dev/rfcomm0). It would be nice if cylon worked too. I'm running out of ideas. Some help would be appreciated. Thanks.

Not able to access "quaternion" data

I can't find a streamQuaternionfunction. Is there any way to get a stream of data from that datasource (the same way you can do with imu, gyroscope, etc)? Thanks.

Connect using Bluetooth address instead of COM port

I came to Cylon since in a quick try I could not drive more than one SPRK+s using sphero.js. I'm using Windows 10.

However, Cylon docs suggest connecting using the COM port. I could not figure out how to find the COM port that the paired SPRK+ is connected to in Windows 10.

In sphero.js, I could connect to the SPRK+ like this using the BLE address:

sprkp = sphero("da:82:11:29:94:98");

Also in cylon-sphero-ble you can connect using the BLE address (but it did not work for my SPRK+):

Cylon.robot({ connections: { bluetooth: { adaptor: 'central', uuid: 'cc360e85785e', module: 'cylon-ble'} },

However with cylon-sphero I seem to have to use the COM port, which I'm not able to find.

Is there a way to connect to my SPRK+ with cylon-sphero using the BLE address?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.