Module: Gibil::Sensor

Defined in:
lib/gibil.rb

Overview

Temperature Sensor interface. Currently works/tested only on Linux

Class Method Summary collapse

Class Method Details

.temperatureObject

Returns:

A float value of the system's temperature


11
12
13
# File 'lib/gibil.rb', line 11

def self.temperature
  File.read('/sys/class/hwmon/hwmon0/temp1_input').to_f / 1000
end