artoo-pebble 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/examples/hello_pebble.rb +2 -2
- data/examples/media_control.rb +1 -1
- data/lib/artoo-pebble/version.rb +1 -1
- data/lib/artoo/adaptors/pebble.rb +1 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c42dd7b0cbedf235cdc1de1e6a7bc58146c8c969
|
4
|
+
data.tar.gz: 3070dbf47b8157a3795709fead12cdbaa660834d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eb882849f35a4fb08c7756d5517760de7d673629e679ca7b8022c8430f134329c80141e4f6698666e2e253ee1a6469364a1c6e92e27cc324934451c413986ee
|
7
|
+
data.tar.gz: 10056e171a13b5318c88b1a1c8c374bca87cbd729844a53dc5ec2e74a478bb146bd018a91dd6be0ed4ac921922d62a54dbe580c18f8120b3435f290a636acf60
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -19,7 +19,7 @@ gem install artoo-pebble
|
|
19
19
|
```ruby
|
20
20
|
require 'artoo'
|
21
21
|
|
22
|
-
connection :pebble, :adaptor => :pebble, :port => "
|
22
|
+
connection :pebble, :adaptor => :pebble, :port => "127.0.0.1:4567", :id => "378B"
|
23
23
|
device :watch, :driver => :pebble
|
24
24
|
|
25
25
|
def button_push(*data)
|
@@ -56,7 +56,7 @@ $ artoo connect scan
|
|
56
56
|
Now you are ready to connect to the Sphero using the socket, in this example port 4567:
|
57
57
|
|
58
58
|
```
|
59
|
-
artoo connect
|
59
|
+
artoo connect serial pebble 4567
|
60
60
|
```
|
61
61
|
|
62
62
|
### Ubuntu
|
@@ -69,7 +69,7 @@ The main steps are:
|
|
69
69
|
|
70
70
|
You will need to pair with the Pebble, entering any needed password.
|
71
71
|
|
72
|
-
Then you can find the Bluetooth address, for example `00:18:33:86:37:8B`, by using the `artoo connect scan` command:
|
72
|
+
Then you can find the Bluetooth address, for example `00:18:33:86:37:8B`, by using the `artoo connect scan` command:
|
73
73
|
|
74
74
|
```
|
75
75
|
$ artoo connect scan
|
@@ -84,7 +84,7 @@ artoo connect bind 00:18:33:86:37:8B pebble
|
|
84
84
|
Now you are ready to connect to the Pebble using a socket, in this example port 4567:
|
85
85
|
|
86
86
|
```
|
87
|
-
artoo connect
|
87
|
+
artoo connect serial pebble 4567
|
88
88
|
```
|
89
89
|
|
90
90
|
### Windows
|
data/examples/hello_pebble.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'artoo'
|
2
2
|
|
3
|
-
connection :pebble, :adaptor => :pebble, :port => "
|
3
|
+
connection :pebble, :adaptor => :pebble, :port => "127.0.0.1:4567", :id => "E36E"
|
4
4
|
device :watch, :driver => :pebble
|
5
|
-
|
5
|
+
|
6
6
|
work do
|
7
7
|
watch.set_nowplaying_metadata("Artoo", "Hello", Time.now.to_s)
|
8
8
|
every(5.seconds) do
|
data/examples/media_control.rb
CHANGED
data/lib/artoo-pebble/version.rb
CHANGED
@@ -5,18 +5,11 @@ module Artoo
|
|
5
5
|
# Connect to a pebble device
|
6
6
|
# @see device documentation for more information
|
7
7
|
class Pebble < Adaptor
|
8
|
-
finalizer :finalize
|
9
8
|
attr_reader :pebble
|
10
9
|
|
11
10
|
# Number of retries when connecting
|
12
11
|
RETRY_COUNT = 5
|
13
12
|
|
14
|
-
# Closes connection with device if connected
|
15
|
-
# @return [Boolean]
|
16
|
-
def finalize
|
17
|
-
pebble.disconnect if connected?
|
18
|
-
end
|
19
|
-
|
20
13
|
# Creates a connection with device
|
21
14
|
# @return [Boolean]
|
22
15
|
def connect
|
@@ -42,7 +35,7 @@ module Artoo
|
|
42
35
|
# Closes connection with device
|
43
36
|
# @return [Boolean]
|
44
37
|
def disconnect
|
45
|
-
pebble.disconnect
|
38
|
+
pebble.disconnect
|
46
39
|
super
|
47
40
|
end
|
48
41
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artoo-pebble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ron Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: artoo
|