arduino_firmata 0.1.1 → 0.1.2
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.
- data/History.txt +5 -0
- data/README.rdoc +14 -7
- data/lib/arduino_firmata.rb +1 -1
- data/lib/arduino_firmata/arduino.rb +13 -0
- data/test/test_arduino_firmata.rb +1 -1
- data/test/test_block.rb +1 -1
- metadata +3 -3
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -10,6 +10,14 @@
|
|
10
10
|
|
11
11
|
Arduino Firmata protocol (http://firmata.org) implementation on Ruby.
|
12
12
|
|
13
|
+
== REQUIREMENTS:
|
14
|
+
|
15
|
+
* Arduino Standard Firmata v2.2
|
16
|
+
Arduino IDE -> [File] -> [Examples] -> [Firmata] -> [StandardFirmata]
|
17
|
+
|
18
|
+
* Ruby 1.8.7+
|
19
|
+
* Ruby 1.9.2+
|
20
|
+
|
13
21
|
== SYNOPSIS:
|
14
22
|
|
15
23
|
Setup
|
@@ -52,7 +60,7 @@ Analog Read
|
|
52
60
|
end
|
53
61
|
|
54
62
|
|
55
|
-
Servo
|
63
|
+
Servo Motor
|
56
64
|
|
57
65
|
loop do
|
58
66
|
angle = rand(180)
|
@@ -82,14 +90,13 @@ Block
|
|
82
90
|
|
83
91
|
see samples https://github.com/shokai/arduino_firmata/tree/master/samples
|
84
92
|
|
85
|
-
== REQUIREMENTS:
|
86
93
|
|
87
|
-
|
88
|
-
Arduino IDE -> [File] -> [Examples] -> [Firmata] -> [StandardFirmata]
|
89
|
-
|
90
|
-
* Ruby 1.8.7+
|
91
|
-
* Ruby 1.9.2+
|
94
|
+
== TEST:
|
92
95
|
|
96
|
+
% gem install bundler
|
97
|
+
% bundle install
|
98
|
+
% export ARDUINO=/dev/tty.usb-device-name
|
99
|
+
% rake test
|
93
100
|
|
94
101
|
== LICENSE:
|
95
102
|
|
data/lib/arduino_firmata.rb
CHANGED
@@ -24,6 +24,19 @@ module ArduinoFirmata
|
|
24
24
|
@serial.read_timeout = 3
|
25
25
|
sleep 3
|
26
26
|
|
27
|
+
trap 'SIGHUP' do
|
28
|
+
close
|
29
|
+
end
|
30
|
+
trap 'SIGINT' do
|
31
|
+
close
|
32
|
+
end
|
33
|
+
trap 'SIGKILL' do
|
34
|
+
close
|
35
|
+
end
|
36
|
+
trap 'SIGTERM' do
|
37
|
+
close
|
38
|
+
end
|
39
|
+
|
27
40
|
Thread.new{
|
28
41
|
loop do
|
29
42
|
process_input
|
data/test/test_block.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arduino_firmata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: serialport
|
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: 2028658490510817249
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
none: false
|
142
142
|
requirements:
|