sensors

Interface to lm-sensors/libsensors from Crystal.

sensors

Iterate and access hardware sensors from your Crystal applications.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      sensors:
        github: dscottboggs/sensors
    
  2. Run shards install

Usage

require "sensors"

Sensors::Chips.each do |chip|
  if chip.prefix == "coretemp"
    chip.each_feature do |feature|
      puts "#{feature.label}: #{feature.subfeatures.first.value}"
    end
  end
end

Contributing

  1. Fork it (https://github.com/dscottboggs/sensors/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

sensors

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 0
  • over 5 years ago
  • May 30, 2019
License

Other

Links
Synced at

Thu, 21 Nov 2024 12:23:59 GMT

Languages