dht-sensor-ffi 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbc1d4a95e39589649bf1341a5014d3f23d27a9d
4
- data.tar.gz: 87f8a550c64a0f3705fda712d1da5eba9a5ad2a7
3
+ metadata.gz: 63663a39efba0de6467011544ca3d8499c5f1fa2
4
+ data.tar.gz: 21385d4745a26aafc4d74f274b30a76938b19bde
5
5
  SHA512:
6
- metadata.gz: e9a19f49961728414c9ac5e49fe59c6e91247d3469ff58e6cc1e91595232e7bb7b7caf64003252e958d3db1d89afde1dde10004f9758fbe972507aabfeb949f1
7
- data.tar.gz: 0968a03243417aa5a13cd9269939b34dc18df49dcd420addd4b9eb2bab80e469e77717d1003034d2a85624977591729a87d63d46c7c4981e8ba5bed42b846e4a
6
+ metadata.gz: 855da19dac958998d0cbf31e6d0d8c08911dde129fde7b9832971ba38fb80ffc0cdb3573816fa8050b2b354f4d9a1c6a4d5997a46e6ec83ecaa6fba65cad7ff6
7
+ data.tar.gz: ad2dedd47e1af15ab3ae2bde21379bc8fc846e588adbd62b4de57aa9d306ef6f02ef15902deb2f418e29fbdb01b1fab747106a7cb68f624c9b08f3daacc106aa
data/Gemfile CHANGED
@@ -7,5 +7,5 @@ group :development do
7
7
  gem "rake-compiler", "~> 0.9"
8
8
  gem "yard", "~> 0.8"
9
9
  gem "bundler", "~> 1.7"
10
- gem "jeweler", "~> 2.0.1"
10
+ gem "jeweler", "~> 2.2"
11
11
  end
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # DHT Sensor FFI
2
2
 
3
3
  A Ruby library for reading from a DHT-11 or DHT-22 type sensor connected to a Raspberry Pi
4
-
4
+
5
5
  ## Installation
6
6
 
7
- First install the bcm2835 lib, available at:
7
+ First install the bcm2835 lib (v1.51+), available at:
8
8
  http://www.airspayce.com/mikem/bcm2835
9
9
 
10
10
  Then either install manually
@@ -32,7 +32,7 @@ puts val.humidity # => 22.700000762939453 (relative humidity %)
32
32
  There is also a simple binary for testing purposes
33
33
 
34
34
  ```bash
35
- $ sudo dht_sensor
35
+ $ dht_sensor
36
36
  Temperature: 22.40 C Humidity: 26.70%
37
37
  ```
38
38
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.2.0
@@ -1,10 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- if Process.uid != 0 then
4
- puts "ERROR: dht_sensor must be run as root in order to access the sensor!"
5
- exit 1
6
- end
7
-
8
3
  $: << File.expand_path("../../lib", __FILE__)
9
4
  require "dht-sensor-ffi"
10
5
  require "dht-sensor/app"
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: dht-sensor-ffi 0.1.4 ruby lib
5
+ # stub: dht-sensor-ffi 0.2.0 ruby lib
6
6
  # stub: ext/extconf.rb
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "dht-sensor-ffi"
10
- s.version = "0.1.4"
10
+ s.version = "0.2.0"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Chetan Sarva"]
15
- s.date = "2014-11-22"
15
+ s.date = "2017-01-04"
16
16
  s.description = "A library to use the DHT-XX type humidity/temperature sensors"
17
17
  s.email = "chetan@pixelcop.net"
18
18
  s.executables = ["dht_sensor"]
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
40
40
  ]
41
41
  s.homepage = "http://github.com/chetan/dht-sensor-ffi"
42
42
  s.licenses = ["MIT"]
43
- s.rubygems_version = "2.4.2"
43
+ s.rubygems_version = "2.5.1"
44
44
  s.summary = "A library to use the DHT-XX type humidity/temperature sensors"
45
45
 
46
46
  if s.respond_to? :specification_version then
@@ -52,14 +52,14 @@ Gem::Specification.new do |s|
52
52
  s.add_development_dependency(%q<rake-compiler>, ["~> 0.9"])
53
53
  s.add_development_dependency(%q<yard>, ["~> 0.8"])
54
54
  s.add_development_dependency(%q<bundler>, ["~> 1.7"])
55
- s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
55
+ s.add_development_dependency(%q<jeweler>, ["~> 2.2"])
56
56
  else
57
57
  s.add_dependency(%q<ffi>, ["~> 1.9"])
58
58
  s.add_dependency(%q<rake>, ["~> 10.3"])
59
59
  s.add_dependency(%q<rake-compiler>, ["~> 0.9"])
60
60
  s.add_dependency(%q<yard>, ["~> 0.8"])
61
61
  s.add_dependency(%q<bundler>, ["~> 1.7"])
62
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
62
+ s.add_dependency(%q<jeweler>, ["~> 2.2"])
63
63
  end
64
64
  else
65
65
  s.add_dependency(%q<ffi>, ["~> 1.9"])
@@ -67,7 +67,7 @@ Gem::Specification.new do |s|
67
67
  s.add_dependency(%q<rake-compiler>, ["~> 0.9"])
68
68
  s.add_dependency(%q<yard>, ["~> 0.8"])
69
69
  s.add_dependency(%q<bundler>, ["~> 1.7"])
70
- s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
70
+ s.add_dependency(%q<jeweler>, ["~> 2.2"])
71
71
  end
72
72
  end
73
73
 
@@ -44,11 +44,8 @@ module DhtSensor
44
44
 
45
45
  def do_loop
46
46
  while true do
47
- begin
48
- print(read())
49
- sleep 2
50
- rescue Interrupt => ex
51
- end
47
+ print(read())
48
+ sleep 2
52
49
  end
53
50
  end
54
51
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dht-sensor-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chetan Sarva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-22 00:00:00.000000000 Z
11
+ date: 2017-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 2.0.1
89
+ version: '2.2'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 2.0.1
96
+ version: '2.2'
97
97
  description: A library to use the DHT-XX type humidity/temperature sensors
98
98
  email: chetan@pixelcop.net
99
99
  executables:
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  version: '0'
140
140
  requirements: []
141
141
  rubyforge_project:
142
- rubygems_version: 2.4.2
142
+ rubygems_version: 2.5.1
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: A library to use the DHT-XX type humidity/temperature sensors