artoo-arduino 1.4.2 → 1.4.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34a20ea820138830b5aa01b4e559cee10d2b10d2
4
- data.tar.gz: 7022e24bc2f4ee5a0466d0b4f79293a437a4b4ac
3
+ metadata.gz: 462cf370bd5b4897c067ebbbd345d043003bb8ab
4
+ data.tar.gz: a24d67d158bc6f063d0d30e3d51bbb56f66a4ff7
5
5
  SHA512:
6
- metadata.gz: b65a4fb5ece3630cecd8a844f38cf2521d40dd08ec1f7afe8227433ce0cfd9217e8f14a32605a476856808fa48d75dd4b63e717d30060739249708695d153b31
7
- data.tar.gz: c91d5c144a7c1ad45e3fa1a336afbd7fef05f8aae45eebe1dd86556ca288a3dc8cd105b8dead782e96389577ebd8bf63772ef164572d6d810dd2fd95225c2301
6
+ metadata.gz: 3da8e81b7ae739155b5006d64e74fa37413aa690c6608583552affed2ada3bb0080a92db9b2a3c4c74850e81a90170af1665d507a7fb8b6d7fa9665965cba52d
7
+ data.tar.gz: 22ac96ca8ed3d906f0a21893c7cecbef3dc85d4dae17fec0dcafb91e0664a78922ecc1f10184738eae8ec4f2425b09f8630623d0f426f0cfc6a9d5c1a673860c
data/.travis.yml CHANGED
@@ -4,7 +4,7 @@ rvm:
4
4
  - 2.0.0
5
5
  - 1.9.3
6
6
  - jruby-1.7.9
7
- - rbx-2.1.1
7
+ - rbx-2.2.7
8
8
  matrix:
9
9
  allow_failures:
10
10
  - rvm: jruby-1.7.9
data/README.md CHANGED
@@ -21,7 +21,7 @@ gem install artoo-arduino
21
21
  ```ruby
22
22
  require 'artoo'
23
23
 
24
- connection :arduino, :adaptor => :firmata, :port => '127.0.0.1:8023'
24
+ connection :arduino, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
25
25
  device :board, :driver => :device_info
26
26
  device :led, :driver => :led, :pin => 13
27
27
 
@@ -50,13 +50,12 @@ The following hardware devices have driver support via the artoo-i2c gem:
50
50
 
51
51
  ## Connecting to Arduino
52
52
 
53
- ### OSX
53
+ ### OSX / Linux
54
54
 
55
55
  The main steps are:
56
56
  - Install the artoo-arduino gem
57
57
  - Find out what serial port your arduino is connected to
58
58
  - Upload the Firmata protocol to the arduino
59
- - Use a socket to serial connection to map a TCP socket to the local unix port
60
59
  - Connect to the device via Artoo
61
60
 
62
61
  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".
@@ -67,48 +66,10 @@ Install the artoo-arduino gem:
67
66
  $ gem install artoo-arduino
68
67
  ```
69
68
 
70
- Once plugged in, use the `artoo connect scan -t serial` command to find out your connection info and serial port address:
71
-
72
- ```
73
- $ artoo connect scan -t serial
74
- ```
75
-
76
- Use the `artoo firmata install` command to install avrdude,
77
- this will allow us to upload firmata to the arduino:
78
-
79
- ```
80
- $ artoo firmata install
81
- ```
82
-
83
- Once the avrdude uploader is installed we upload the firmata protocol to
84
- the arduino, use the arduino serial port address found when you ran `artoo
85
- connect scan -t serial`, or leave it blank to use the default address `/dev/ttyACM0`:
86
-
87
- ```
88
- $ artoo firmata upload /dev/ttyACM0
89
- ```
90
-
91
- Now you are ready to connect to the Arduino using a socket, in this example the socket to serial is set on port 4567 (which is also the default value):
69
+ Install the hybridgroup-serialport gem:
92
70
 
93
71
  ```
94
- artoo connect serial ttyACM0 4567
95
- ```
96
-
97
- ### Ubuntu
98
-
99
- The main steps are:
100
- - Install the artoo-arduino gem
101
- - Find out what serial port your arduino is connected to
102
- - Upload the Firmata protocol to the arduino
103
- - Use a socket to serial connection to map a TCP socket to the local unix port
104
- - Connect to the device via Artoo
105
-
106
- First plug the Arduino into your computer via the USB/serial port.
107
-
108
- Install the artoo-arduino gem:
109
-
110
- ```
111
- $ gem install artoo-arduino
72
+ $ gem install hybridgroup-serialport
112
73
  ```
113
74
 
114
75
  Once plugged in, use the `artoo connect scan -t serial` command to find out your connection info and serial port address:
@@ -132,10 +93,14 @@ connect scan -t serial`, or leave it blank to use the default address `/dev/ttyA
132
93
  $ artoo firmata upload /dev/ttyACM0
133
94
  ```
134
95
 
135
- Now you are ready to connect to the Arduino using a socket, in this example the socket to serial is set on port 4567 (which is also the default value):
96
+ Change the example to use the correct serial port address
97
+
98
+ ```
99
+ connection :arduino, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
100
+ ```
136
101
 
137
102
  ```
138
- artoo connect serial ttyACM0 4567
103
+ connection :arduino, :adaptor => :firmata, :port => '/dev/tty.usbmodem1411' #osx
139
104
  ```
140
105
 
141
106
  ### Windows
@@ -4,8 +4,8 @@ require 'artoo'
4
4
  # change to the correct analog input, in this case pin A0.
5
5
  # Circuit and schematic here: http://arduino.cc/en/tutorial/button
6
6
 
7
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
8
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
8
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
9
9
 
10
10
  # Analog inputs are based from 0 to 5 on the Arduino UNO, may vary on other arduino boards
11
11
  device :sensor, driver: :analog_sensor, pin: 0, interval: 0.25, upper: 900, lower: 200
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://arduino.cc/en/Tutorial/Blink
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :board, :driver => :device_info
8
8
  device :led, :driver => :led, :pin => 13
9
9
 
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://arduino.cc/en/Tutorial/Blink
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :board, :driver => :device_info
8
8
  device :led, :driver => :led, :pin => 13
9
9
 
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://arduino.cc/en/tutorial/button
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :led, :driver => :led, :pin => 13
8
8
  device :button, :driver => :button, :pin => 2, :interval => 0.01
9
9
 
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  #Circuit's breadboard layout here: http://learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors/breadboard-layout
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:4567'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:4567'
7
7
  device :board, :driver => :device_info
8
8
  device :motor, :driver => :motor, :speed_pin => 3 # Use a PWM pin
9
9
 
@@ -3,8 +3,8 @@ require 'artoo'
3
3
  #Circuit's breadboard layout for the L293D: http://www.electrojoystick.com/tutorial/?p=759
4
4
  #For the L239DNE: http://bit.ly/14QdjD5
5
5
 
6
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
7
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
6
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
7
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
8
8
  device :board, :driver => :device_info
9
9
  device :motor, :driver => :motor,
10
10
  :forward_pin => 4, # Digital or PWM pin
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  #Circuit's breadboard layout here: http://learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors/breadboard-layout
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :board, :driver => :device_info
8
8
  device :motor, :driver => :motor, :switch_pin => 3 # Use a digital or PWM pin
9
9
 
@@ -4,8 +4,8 @@ require 'artoo'
4
4
  #For the L239DNE: http://bit.ly/14QdjD5,
5
5
  # L293DNE's pin 1 should go to 5V instead of to Arduino's pin 9
6
6
 
7
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
8
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
8
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
9
9
  device :board, :driver => :device_info
10
10
  device :motor, :driver => :motor, :forward_pin => 4, :backward_pin => 2
11
11
 
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://arduino.cc/en/Tutorial/Fade
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :board, :driver => :device_info
8
8
  device :led, :driver => :led, :pin => 3
9
9
 
@@ -8,8 +8,8 @@ require 'artoo'
8
8
  # change to the correct analog input, in this case pin A0.
9
9
  # Circuit and schematic here: http://arduino.cc/en/tutorial/button
10
10
 
11
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
12
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
11
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
12
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
13
13
  device :sensor, driver: :analog_sensor, pin: 0, interval: 0
14
14
  device :led, :driver => :led, :pin => 3
15
15
 
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://arduino.cc/en/tutorial/button
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' # linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :led, :driver => :device_info, :pin => 13
8
8
  device :button, :driver => :button, :pin => 2, :interval => 0.01
9
9
 
data/examples/maxbotix.rb CHANGED
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://www.electrojoystick.com/tutorial/?page_id=285
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:4567'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0'
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:4567'
7
7
  device :sonar, :driver => :maxbotix, :pin => 0, :interval => 0.5
8
8
  device :board, :driver => :device_info
9
9
 
data/examples/motor.rb CHANGED
@@ -7,8 +7,8 @@ speed_pin = 3 # PWM pin
7
7
  speed = 0
8
8
  forward = true
9
9
 
10
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
11
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
10
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
11
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
12
12
  device :board, :driver => :device_info
13
13
  device :motor, :driver => :motor, :pin => [leg1_pin, leg2_pin, speed_pin]
14
14
 
@@ -7,8 +7,8 @@ require 'artoo'
7
7
  # change to the correct analog input, in this case pin A0.
8
8
  # Circuit and schematic here: http://arduino.cc/en/tutorial/button
9
9
 
10
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
11
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
10
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
11
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
12
12
  device :sensor, driver: :analog_sensor, pin: 0, interval: 0
13
13
  device :motor, :driver => :motor, :speed_pin => 3 # Use a PWM pin
14
14
 
data/examples/servo.rb CHANGED
@@ -2,8 +2,8 @@ require 'artoo'
2
2
 
3
3
  # Circuit and schematic here: http://arduino.cc/en/Tutorial/Sweep
4
4
 
5
- #connection :firmata, :adaptor => :firmata, :port => '/dev/tty*'
6
- connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
5
+ connection :firmata, :adaptor => :firmata, :port => '/dev/ttyACM0' #linux
6
+ #connection :firmata, :adaptor => :firmata, :port => '127.0.0.1:8023'
7
7
  device :board, :driver => :device_info
8
8
  device :servo, :driver => :servo, :pin => 3 # pin must be a PWM pin
9
9
 
@@ -1,5 +1,5 @@
1
1
  module Artoo
2
2
  module Arduino
3
- VERSION = '1.4.2'
3
+ VERSION = '1.4.3'
4
4
  end
5
5
  end
@@ -1,3 +1,5 @@
1
+ require 'artoo/commands/firmata'
2
+
1
3
  module Artoo
2
4
  module Commands
3
5
  class Arduino < Artoo::Commands::Firmata
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.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Evans
@@ -11,104 +11,104 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-04-04 00:00:00.000000000 Z
14
+ date: 2014-05-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: artoo
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - ">="
20
+ - - '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.6.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
29
  version: 1.6.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: artoo-gpio
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - ">="
34
+ - - '>='
35
35
  - !ruby/object:Gem::Version
36
36
  version: '0'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ">="
41
+ - - '>='
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: artoo-i2c
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ">="
48
+ - - '>='
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - ">="
55
+ - - '>='
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hybridgroup-firmata
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - ">="
62
+ - - '>='
63
63
  - !ruby/object:Gem::Version
64
64
  version: 0.4.5
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: 0.4.5
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: minitest
74
74
  requirement: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - "~>"
76
+ - - ~>
77
77
  - !ruby/object:Gem::Version
78
78
  version: '5.0'
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
- - - "~>"
83
+ - - ~>
84
84
  - !ruby/object:Gem::Version
85
85
  version: '5.0'
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: minitest-happy
88
88
  requirement: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - ">="
90
+ - - '>='
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
- - - ">="
97
+ - - '>='
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: mocha
102
102
  requirement: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - "~>"
104
+ - - ~>
105
105
  - !ruby/object:Gem::Version
106
106
  version: 0.14.0
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - "~>"
111
+ - - ~>
112
112
  - !ruby/object:Gem::Version
113
113
  version: 0.14.0
114
114
  description: Artoo adaptor and driver for Arduino
@@ -119,9 +119,9 @@ extensions:
119
119
  - ext/Rakefile
120
120
  extra_rdoc_files: []
121
121
  files:
122
- - ".gitignore"
123
- - ".rvmrc.example"
124
- - ".travis.yml"
122
+ - .gitignore
123
+ - .rvmrc.example
124
+ - .travis.yml
125
125
  - Gemfile
126
126
  - Gemfile.lock
127
127
  - LICENSE
@@ -163,18 +163,21 @@ require_paths:
163
163
  - lib
164
164
  required_ruby_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - ">="
166
+ - - '>='
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project: artoo-arduino
176
- rubygems_version: 2.2.2
176
+ rubygems_version: 2.0.6
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Artoo adaptor and driver for Arduino
180
- test_files: []
180
+ test_files:
181
+ - test/adaptors/firmata_test.rb
182
+ - test/test_helper.rb
183
+ has_rdoc: