Class: Subduino::Parse::Analogic
- Defined in:
- lib/subduino/parse.rb
Instance Method Summary collapse
Methods inherited from Digital
#graph, #initialize, #name, #raw, #sparkline, #to_s, #type
Constructor Details
This class inherits a constructor from Subduino::Parse::Digital
Instance Method Details
#digital? ⇒ Boolean
35 |
# File 'lib/subduino/parse.rb', line 35 def digital?; false; end |
#parse ⇒ Object
36 |
# File 'lib/subduino/parse.rb', line 36 def parse; @v; end |
#ratio ⇒ Object
37 38 39 40 |
# File 'lib/subduino/parse.rb', line 37 def ratio return 0 if @v.zero? @v * 100 / 1023 end |