BBB 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ class TemperatureExampleApp < BBB::Application
22
22
 
23
23
  # This is the basic run loop
24
24
  def run
25
- puts thermometer.read
25
+ puts "value: #{thermometer.read}\r"
26
26
  end
27
27
  end
28
28
 
@@ -25,6 +25,7 @@ module BBB
25
25
  end
26
26
 
27
27
  def read
28
+ file_handle.rewind
28
29
  file_handle.read
29
30
  end
30
31
 
@@ -25,7 +25,7 @@ module BBB
25
25
 
26
26
  define_method("p#{pin.position.to_s[1..-1]}=") do |value|
27
27
  @pins[pin.position].write value
28
- end if pin.mode == :output
28
+ end if pin.respond_to?(:mode) && pin.mode == :output
29
29
  end
30
30
  end
31
31
 
@@ -4,6 +4,7 @@ module BBB
4
4
  include Pinnable
5
5
 
6
6
  attr_reader :pin_io, :position
7
+ attr_accessor :pin_io
7
8
 
8
9
  def initialize(pin_io=nil, position=nil)
9
10
  @pin_io = pin_io || MockPin.new
data/lib/BBB/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module BBB
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: BBB
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  segments:
146
146
  - 0
147
- hash: -825880762915958157
147
+ hash: -59951058079866313
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  segments:
155
155
  - 0
156
- hash: -825880762915958157
156
+ hash: -59951058079866313
157
157
  requirements: []
158
158
  rubyforge_project:
159
159
  rubygems_version: 1.8.25