Class: Subduino::Parse::Temp

Inherits:
Analogic show all
Defined in:
lib/subduino/parse/temp.rb

Instance Method Summary collapse

Methods inherited from Analogic

#digital?, #ratio

Methods inherited from Digital

#digital?, #graph, #initialize, #name, #raw, #sparkline, #type

Constructor Details

This class inherits a constructor from Subduino::Parse::Digital

Instance Method Details

#parseObject



6
7
8
# File 'lib/subduino/parse/temp.rb', line 6

def parse
  @v * 0.035
end

#to_sObject



10
11
12
# File 'lib/subduino/parse/temp.rb', line 10

def to_s
  "%0.2f°C" % parse
end