sensors
sensors
Iterate and access hardware sensors from your Crystal applications.
Installation
-
Add the dependency to your
shard.yml
:dependencies: sensors: github: dscottboggs/sensors
-
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
- Fork it (https://github.com/dscottboggs/sensors/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- D. Scott Boggs - creator and maintainer
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