Class: Tinkerforge::BrickletMotionDetectorV2
- Inherits:
-
Object
- Object
- Tinkerforge::BrickletMotionDetectorV2
- Defined in:
- lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.rb
Instance Method Summary collapse
-
#blackout ⇒ Object
Switches off all three blue backlight LEDs.
-
#state ⇒ Object
Returns the device’s state.
Instance Method Details
#blackout ⇒ Object
Switches off all three blue backlight LEDs.
6 7 8 9 |
# File 'lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.rb', line 6 def blackout set_indicator(0, 0, 0) true end |
#state ⇒ Object
Returns the device’s state.
12 13 14 15 16 17 18 |
# File 'lib/tinderfridge/devices/bricklet_motion_detector_v2/bricklet_motion_detector_v2.rb', line 12 def state super.merge( 'motion_detected' => get_motion_detected == 1, 'sensitivity' => get_sensitivity, 'indicator' => get_indicator, ) end |