-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathollie.js
More file actions
40 lines (31 loc) · 699 Bytes
/
ollie.js
File metadata and controls
40 lines (31 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var Cylon = require('cylon');
Cylon.robot({
connections: {
bluetooth: {
adaptor: 'central',
uuid: '5ce497c34ffe4c4b92b7a6026f427310',
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();