Sha256: fcef6601f2a3e8c509f9d15014695711ea5225551dbb438808cb51f14338d695
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
# DHT Sensor FFI A Ruby library for reading from a DHT-11 or DHT-22 type sensor connected to a Raspberry Pi ## Installation First install the bcm2835 lib, available at: http://www.airspayce.com/mikem/bcm2835 Then either install manually ``` gem install dht-sensor-ffi ``` or add to your Gemfile ``` gem "dht-sensor-ffi" ``` ## Usage ```ruby require "dht-sensor-ffi" val = DhtSensor.read(4, 22) # pin=4, sensor type=DHT-22 puts val.temp # => 21.899999618530273 (temp in C) puts val.temp_f # => 71.4199993133545 (temp in F) puts val.humidity # => 22.700000762939453 (relative humidity %) ``` ## Contributing to dht-sensor-ffi * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet. * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it. * Fork the project. * Start a feature/bugfix branch. * Commit and push until you are happy with your contribution. * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. ## Copyright Copyright (c) 2014 Chetan Sarva. Licensed under the MIT license. See LICENSE.txt for further details.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
dht-sensor-ffi-0.1.1 | README.md |
dht-sensor-ffi-0.1.0 | README.md |