artoo-arduino 1.0.0.pre → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -16
- data/README.md +76 -1
- data/artoo-arduino.gemspec +2 -2
- data/examples/firmata.rb +1 -1
- data/lib/artoo/drivers/button.rb +2 -1
- data/lib/artoo/drivers/led.rb +1 -1
- data/lib/artoo-arduino/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cab89e35158f2d7be237a7b0a2cee159953f573
|
4
|
+
data.tar.gz: dcedc720fa195da509d2865bf47bd6b0040ae3a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db12d34801fe73ea8af6aad96c6eb225bce96917d1550236ce76fc8f9a3c4788e1eb95854e9a7baa312483dfdddbbccf9686ed9b5a4961eef5c1fbbe07a10213
|
7
|
+
data.tar.gz: 9f338021acab661e86751a82524042a81665fca35b62d50f83c04aed1b4108a22c604450a6a98cfd56c353bfa421bafef805d5f07d7ba2d4723ecfa4de5d4956
|
data/Gemfile.lock
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
artoo-arduino (1.0.
|
5
|
-
artoo (~> 1.0.0.
|
6
|
-
hybridgroup-firmata (~> 0.4.
|
4
|
+
artoo-arduino (1.0.1)
|
5
|
+
artoo (~> 1.0.0.rc3)
|
6
|
+
hybridgroup-firmata (~> 0.4.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: http://rubygems.org/
|
10
10
|
specs:
|
11
|
-
artoo (1.0.0.
|
12
|
-
celluloid (~> 0.14.
|
13
|
-
celluloid-io (~> 0.14.
|
11
|
+
artoo (1.0.0.rc3)
|
12
|
+
celluloid (~> 0.14.1)
|
13
|
+
celluloid-io (~> 0.14.1)
|
14
14
|
multi_json (~> 1.6)
|
15
15
|
pry (~> 0.9)
|
16
16
|
rake (~> 10.0)
|
17
|
-
reel (~> 0.4.pre)
|
18
|
-
|
17
|
+
reel (~> 0.4.0.pre)
|
18
|
+
thor (~> 0.18.1)
|
19
|
+
celluloid (0.14.1)
|
19
20
|
timers (>= 1.0.0)
|
20
|
-
celluloid-io (0.14.
|
21
|
-
celluloid (>= 0.
|
21
|
+
celluloid-io (0.14.1)
|
22
|
+
celluloid (>= 0.14.1)
|
22
23
|
nio4r (>= 0.4.5)
|
23
24
|
certified (0.1.1)
|
24
25
|
coderay (1.0.9)
|
@@ -27,29 +28,30 @@ GEM
|
|
27
28
|
certified
|
28
29
|
http_parser.rb
|
29
30
|
http_parser.rb (0.5.3)
|
30
|
-
hybridgroup-firmata (0.4.
|
31
|
+
hybridgroup-firmata (0.4.2)
|
31
32
|
event_spitter
|
32
33
|
metaclass (0.0.1)
|
33
|
-
method_source (0.8.
|
34
|
+
method_source (0.8.2)
|
34
35
|
minitest (5.0.1)
|
35
36
|
minitest-happy (1.0.0)
|
36
37
|
mocha (0.14.0)
|
37
38
|
metaclass (~> 0.0.1)
|
38
|
-
multi_json (1.7.
|
39
|
-
nio4r (0.
|
39
|
+
multi_json (1.7.9)
|
40
|
+
nio4r (0.5.0)
|
40
41
|
pry (0.9.12.2)
|
41
42
|
coderay (~> 1.0.5)
|
42
43
|
method_source (~> 0.8)
|
43
44
|
slop (~> 3.4)
|
44
45
|
rack (1.5.2)
|
45
|
-
rake (10.0
|
46
|
+
rake (10.1.0)
|
46
47
|
reel (0.4.0.pre)
|
47
48
|
celluloid-io (>= 0.8.0)
|
48
49
|
http (>= 0.2.0)
|
49
50
|
http_parser.rb (>= 0.5.3)
|
50
51
|
rack (>= 1.4.0)
|
51
52
|
websocket_parser (>= 0.1.2)
|
52
|
-
slop (3.4.
|
53
|
+
slop (3.4.6)
|
54
|
+
thor (0.18.1)
|
53
55
|
timers (1.1.0)
|
54
56
|
websocket_parser (0.1.4)
|
55
57
|
http
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Artoo Adaptor For Arduino
|
2
2
|
|
3
|
-
This repository contains the Artoo (http://artoo.io/) adaptor and drivers for the Arduino microcontroller using the
|
3
|
+
This repository contains the Artoo (http://artoo.io/) adaptor and drivers for the Arduino microcontroller (http://arduino.cc/) using the Firmata protocol (http://firmata.org).
|
4
4
|
|
5
5
|
Artoo is a open source micro-framework for robotics using Ruby.
|
6
6
|
|
@@ -13,3 +13,78 @@ For more information abut Artoo, check out our repo at https://github.com/hybrid
|
|
13
13
|
```
|
14
14
|
gem install artoo-arduino
|
15
15
|
```
|
16
|
+
|
17
|
+
## Using
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'artoo'
|
21
|
+
|
22
|
+
connection :arduino, :adaptor => :firmata, :port => '127.0.0.1:8023'
|
23
|
+
device :board
|
24
|
+
device :led, :driver => :led, :pin => 13
|
25
|
+
|
26
|
+
work do
|
27
|
+
puts "Firmware name #{board.firmware_name}"
|
28
|
+
puts "Firmata version #{board.version}"
|
29
|
+
every 1.second do
|
30
|
+
led.toggle
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
## Connecting to Arduino
|
36
|
+
|
37
|
+
### OSX
|
38
|
+
|
39
|
+
The main steps are:
|
40
|
+
- Connect to the Arduino via serial port/USB
|
41
|
+
- Use a socket to serial connection to map a TCP socket to the local unix port
|
42
|
+
- Connect to the device via Artoo
|
43
|
+
|
44
|
+
First plug the Arduino into your computer via the USB/serial port. A dialog box will appear telling you that a new network interface has been detected. Click "Network Preferences...", and when it opens, simply click "Apply".
|
45
|
+
|
46
|
+
Once plugged in, use the `artoo connect scan` command to find out your connection info:
|
47
|
+
|
48
|
+
```
|
49
|
+
$ artoo connect scan
|
50
|
+
```
|
51
|
+
|
52
|
+
Now you are ready to connect to the Arduino using a socket, such as in this example port 4567:
|
53
|
+
|
54
|
+
```
|
55
|
+
artoo connect socat 4567 tty.USBABC
|
56
|
+
```
|
57
|
+
|
58
|
+
### Ubuntu
|
59
|
+
|
60
|
+
The main steps are:
|
61
|
+
- Connect to the Arduino via serial port/USB
|
62
|
+
- Use a socket to serial connection to map a TCP socket to the local unix port
|
63
|
+
- Connect to the device via Artoo
|
64
|
+
|
65
|
+
First plug the Arduino into your computer via the USB/serial port.
|
66
|
+
|
67
|
+
Once plugged in, use the `ls /dev/ttyACM*` command to find out your connection info:
|
68
|
+
|
69
|
+
```
|
70
|
+
$ ls /dev/ttyACM*
|
71
|
+
/dev/ttyACM0
|
72
|
+
```
|
73
|
+
|
74
|
+
Now you are ready to connect to the Arduino using the socket, in this example port 4567:
|
75
|
+
|
76
|
+
```
|
77
|
+
artoo connect socat 4567 ttyACM0
|
78
|
+
```
|
79
|
+
|
80
|
+
### Windows
|
81
|
+
|
82
|
+
Someone please fill in the blanks here...
|
83
|
+
|
84
|
+
## Contributing
|
85
|
+
|
86
|
+
1. Fork it
|
87
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
88
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
89
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
90
|
+
5. Create new Pull Request
|
data/artoo-arduino.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency 'artoo', '~> 1.0.0.
|
23
|
-
s.add_runtime_dependency 'hybridgroup-firmata', '~> 0.4.
|
22
|
+
s.add_runtime_dependency 'artoo', '~> 1.0.0.rc3'
|
23
|
+
s.add_runtime_dependency 'hybridgroup-firmata', '~> 0.4.2'
|
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/examples/firmata.rb
CHANGED
data/lib/artoo/drivers/button.rb
CHANGED
data/lib/artoo/drivers/led.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artoo-arduino
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ron Evans
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: artoo
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ~>
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.0.0.
|
20
|
+
version: 1.0.0.rc3
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 1.0.0.
|
27
|
+
version: 1.0.0.rc3
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: hybridgroup-firmata
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.4.
|
34
|
+
version: 0.4.2
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.4.
|
41
|
+
version: 0.4.2
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: minitest
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,9 +131,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- - '
|
134
|
+
- - '>='
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
136
|
+
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project: artoo-arduino
|
139
139
|
rubygems_version: 2.0.3
|