Install needed node packages:
npm install -g cylon-ble
npm install cylon cylon-ollie
First scan for your BB8 (the device name should contain BB in it):
> sudo cylon-ble-scan
[...]
Peripheral discovered!
Name: BB-3B29
UUID: 161205d4f3a04149a1ea82762d30fd86
rssi: -63
Then take its UUID and plop it in the bluetooth
section of this, and you can run it:
var Cylon = require('cylon');
Cylon.robot({
connections: {
bluetooth: { adaptor: 'central', uuid: '161205d4f3a04149a1ea82762d30fd86', module: 'cylon-ble'}
},
devices: {
ollie: { driver: 'ollie'}
},
work: function(my) {
my.ollie.wake(function(err, data){
console.log("wake");
after(200, function() {
my.ollie.setRGB(0x00FFFF);
});
after(500, function() {
my.ollie.setRGB(0xFF0000);
my.ollie.roll(60, 0, 1);
after(1000, function(){
my.ollie.roll(60, 90, 1);
after(1000, function(){
my.ollie.stop();
});
});
});
});
}
}).start();
Does this work? I have a mac and installed using 'npm' but I only got to 'starting scan.' and then nothing else.
I even brought up the BB8 app on my iPhone to wake up the robot, but no results with the scan program.