Class: UdooNeoRest::Magnetometer

Inherits:
Sinatra::Application
  • Object
show all
Defined in:
lib/udooneorest/magnetometer.rb

Instance Method Summary collapse

Instance Method Details

#dataObject

Get the value for the magnetometer



44
45
46
# File 'lib/udooneorest/magnetometer.rb', line 44

def data
  UdooNeoRest::Base.cat_and_status UdooNeoRest::Base.axis_path_data('Magnetometer')
end

#enable(value) ⇒ Object

Enable/Disable the magnetometer

value : 0 = Disable, 1 = Enable



37
38
39
# File 'lib/udooneorest/magnetometer.rb', line 37

def enable(value)
  UdooNeoRest::Base.change_state UdooNeoRest::Base.axis_path_enable('Magnetometer'), value
end