Class: Tinkerforge::BrickletParticulateMatter

Inherits:
Object
  • Object
show all
Defined in:
lib/tinderfridge/devices/bricklet_particulate_matter/bricklet_particulate_matter.rb

Instance Method Summary collapse

Instance Method Details

#disableObject

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

#enableObject

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

#stateObject

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