sensors

Version, currently master branch1 version
  • master branchlatestMay 30, 2019

github.com/dscottboggs/sensors

Interface to lm-sensors/libsensors from Crystal.

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  sensors:
    github: dscottboggs/sensors
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.28.0
License
MIT
Author
D. Scott Boggs

Dependencies

This version declares no dependencies.

README

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