Class: Tinkerforge::BrickletParticulateMatter
- Inherits:
-
Object
- Object
- Tinkerforge::BrickletParticulateMatter
- Defined in:
- lib/tinderfridge/devices/bricklet_particulate_matter/bricklet_particulate_matter.rb
Instance Method Summary collapse
-
#disable ⇒ Object
Disables the fan and the laser diode.
-
#enable ⇒ Object
Enables the fan and the laser diode.
-
#state ⇒ Object
Returns the device’s state.
Instance Method Details
#disable ⇒ Object
Disables the fan and the laser diode.
11 12 13 |
# File 'lib/tinderfridge/devices/bricklet_particulate_matter/bricklet_particulate_matter.rb', line 11 def disable set_enable false end |
#enable ⇒ Object
Enables the fan and the laser diode.
6 7 8 |
# File 'lib/tinderfridge/devices/bricklet_particulate_matter/bricklet_particulate_matter.rb', line 6 def enable set_enable true end |
#state ⇒ Object
Returns the device’s state.
16 17 18 19 20 21 22 23 |
# File 'lib/tinderfridge/devices/bricklet_particulate_matter/bricklet_particulate_matter.rb', line 16 def state super.merge( 'enabled' => get_enable, 'pm_concentration' => get_pm_concentration, 'pm_count' => get_pm_count, 'sensor_info' => get_sensor_info, ) end |