artoo-gpio 0.1.0 → 0.2.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 +8 -8
- data/README.md +19 -5
- data/artoo-gpio.gemspec +1 -1
- data/lib/artoo/drivers/analog_sensor.rb +1 -1
- data/lib/artoo-gpio/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46d2befaebe846b1fa9194e798a5624d663d6699
|
4
|
+
data.tar.gz: c0fb5c06e0f5a8022ec7c3719692fcf97141921e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48c6488918dff6d65afe26c072e48a7c010b883a2b4bcefc24e5803537c867df774bb73dc867bcdfc246e3b25efb9f3d26725226b190d55fc1ff4edc9fcef433
|
7
|
+
data.tar.gz: 6cc2f36893b832c23287f832ecb0ad8cf0a9574ba983e2d7df1dcc713e294b61159189d68ac39728f22a510db0736f086571342cb7bf5104ca7ae035d713e29c
|
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
artoo-gpio (0.
|
5
|
-
artoo (~> 1.
|
4
|
+
artoo-gpio (0.2.0)
|
5
|
+
artoo (~> 1.2.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
artoo (1.
|
10
|
+
artoo (1.2.0)
|
11
11
|
celluloid (~> 0.15.0)
|
12
12
|
celluloid-io (~> 0.15.0)
|
13
13
|
multi_json (~> 1.6)
|
14
14
|
pry (~> 0.9)
|
15
15
|
rake (~> 10.0)
|
16
|
-
reel (~> 0.4.0
|
16
|
+
reel (~> 0.4.0)
|
17
17
|
thor (~> 0.18.1)
|
18
18
|
celluloid (0.15.1)
|
19
19
|
timers (~> 1.1.0)
|
@@ -21,7 +21,7 @@ GEM
|
|
21
21
|
celluloid (>= 0.15.0)
|
22
22
|
nio4r (>= 0.5.0)
|
23
23
|
coderay (1.0.9)
|
24
|
-
http (0.5.0
|
24
|
+
http (0.5.0)
|
25
25
|
http_parser.rb
|
26
26
|
http_parser.rb (0.6.0.beta.2)
|
27
27
|
metaclass (0.0.1)
|
@@ -37,10 +37,10 @@ GEM
|
|
37
37
|
method_source (~> 0.8)
|
38
38
|
slop (~> 3.4)
|
39
39
|
rake (10.1.0)
|
40
|
-
reel (0.4.0
|
41
|
-
celluloid (>= 0.15.
|
40
|
+
reel (0.4.0)
|
41
|
+
celluloid (>= 0.15.1)
|
42
42
|
celluloid-io (>= 0.15.0)
|
43
|
-
http (>= 0.5.0
|
43
|
+
http (>= 0.5.0)
|
44
44
|
http_parser.rb (>= 0.6.0.beta.2)
|
45
45
|
websocket_parser (>= 0.1.4)
|
46
46
|
slop (3.4.6)
|
data/README.md
CHANGED
@@ -16,18 +16,32 @@ gem install artoo-gpio
|
|
16
16
|
|
17
17
|
## Using
|
18
18
|
|
19
|
-
Normally, this gem is automatically included as part of using an Artoo adaptor that can connect to your hardware. For example, artoo-arduino and artoo-
|
19
|
+
Normally, this gem is automatically included as part of using an Artoo adaptor that can connect to your hardware. For example, artoo-arduino and artoo-digispark both make use of the drivers in this gem.
|
20
|
+
|
21
|
+
Here is the "led" driver being used in an Arduino:
|
20
22
|
|
21
23
|
```ruby
|
22
24
|
require 'artoo'
|
23
25
|
|
24
26
|
connection :arduino, :adaptor => :firmata, :port => '127.0.0.1:8023'
|
25
|
-
device :board
|
26
27
|
device :led, :driver => :led, :pin => 13
|
27
28
|
|
28
29
|
work do
|
29
|
-
|
30
|
-
|
30
|
+
every 1.second do
|
31
|
+
led.toggle
|
32
|
+
end
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
Here is the same "led" driver being used by a Digispark.
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
require 'artoo'
|
40
|
+
|
41
|
+
connection :digispark, :adaptor => :littlewire, :vendor => 0x1781, :product => 0x0c9f
|
42
|
+
device :led, :driver => :led, :pin => 1
|
43
|
+
|
44
|
+
work do
|
31
45
|
every 1.second do
|
32
46
|
led.toggle
|
33
47
|
end
|
@@ -36,7 +50,7 @@ end
|
|
36
50
|
|
37
51
|
## Devices supported
|
38
52
|
|
39
|
-
The following GPIO hardware devices have driver support:
|
53
|
+
The following GPIO hardware devices have Artoo driver support:
|
40
54
|
- Button
|
41
55
|
- LED
|
42
56
|
- Maxbotix ultrasonic range finder
|
data/artoo-gpio.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
21
|
s.require_paths = ["lib"]
|
22
22
|
|
23
|
-
s.add_runtime_dependency 'artoo', '~> 1.
|
23
|
+
s.add_runtime_dependency 'artoo', '~> 1.2.0'
|
24
24
|
s.add_development_dependency 'minitest', '~> 5.0'
|
25
25
|
s.add_development_dependency 'minitest-happy'
|
26
26
|
s.add_development_dependency 'mocha', '~> 0.14.0'
|
data/lib/artoo-gpio/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artoo-gpio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ron Evans
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-09-
|
14
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: artoo
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.2.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: minitest
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|