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