Class: UdooNeoRest::Accelerometer
- Inherits:
-
Sinatra::Application
- Object
- Sinatra::Application
- UdooNeoRest::Accelerometer
- Defined in:
- lib/udooneorest/accelerometer.rb
Instance Method Summary collapse
-
#data ⇒ Object
Get the value for the Accelerometer.
-
#enable(value) ⇒ Object
Enable/Disable the Accelerometer.
Instance Method Details
#data ⇒ Object
Get the value for the Accelerometer
44 45 46 |
# File 'lib/udooneorest/accelerometer.rb', line 44 def data UdooNeoRest::Base.cat_and_status UdooNeoRest::Base.axis_path_data('Accelerometer') end |
#enable(value) ⇒ Object
Enable/Disable the Accelerometer
value : 0 = Disable, 1 = Enable
37 38 39 |
# File 'lib/udooneorest/accelerometer.rb', line 37 def enable(value) UdooNeoRest::Base.change_state UdooNeoRest::Base.axis_path_enable('Accelerometer'), value end |