firmata 0.0.6 → 0.0.7

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.
@@ -5,12 +5,15 @@ board = Firmata::Board.new('/dev/tty.usbmodemfa131')
5
5
 
6
6
  board.connect
7
7
 
8
+ pin_number = 3
9
+ rate = 0.5
10
+
8
11
  10.times do
9
- board.digital_write 13, Firmata::Board::HIGH
12
+ board.digital_write pin_number, Firmata::Board::HIGH
10
13
  puts '+'
11
- board.delay 0.5
14
+ board.delay rate
12
15
 
13
- board.digital_write 13, Firmata::Board::LOW
16
+ board.digital_write pin_number, Firmata::Board::LOW
14
17
  puts '-'
15
- board.delay 0.5
18
+ board.delay rate
16
19
  end
data/lib/firmata/board.rb CHANGED
@@ -89,7 +89,7 @@ module Firmata
89
89
  @connected
90
90
  end
91
91
 
92
- # Public: Make connection to Arduio.
92
+ # Public: Make connection to Arduino.
93
93
  #
94
94
  # Returns Firmata::Board board.
95
95
  def connect
@@ -175,6 +175,7 @@ module Firmata
175
175
  value = (port_value >> (i & 0x07)) & 0x01
176
176
  pin.value = value
177
177
  emit('digital-read', pin_number, value)
178
+ emit("digital-read-#{pin_number}", value)
178
179
  end
179
180
  end
180
181
 
@@ -1,3 +1,3 @@
1
1
  module Firmata
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firmata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
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-08-30 00:00:00.000000000 Z
12
+ date: 2012-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pry