Module: RPi::Dht
- Extended by:
- Dht
- Included in:
- Dht
- Defined in:
- lib/rpi/dht.rb,
lib/rpi/dht/base.rb,
lib/rpi/dht/dht11.rb,
lib/rpi/dht/dht22.rb,
lib/rpi/dht/version.rb
Defined Under Namespace
Classes: Base, Dht11, Dht22, InvalidByteError, InvalidByteSetError, ParityError
Constant Summary
collapse
- VERSION =
"0.2.1"
Instance Method Summary
collapse
Instance Method Details
#read_11(pin, tries: 50) ⇒ Object
22
23
24
|
# File 'lib/rpi/dht.rb', line 22
def read_11(pin, tries: 50)
Dht11.read(pin, tries: tries)
end
|
#read_11!(pin) ⇒ Object
18
19
20
|
# File 'lib/rpi/dht.rb', line 18
def read_11!(pin)
Dht11.read!(pin)
end
|
#read_22(pin, tries: 50) ⇒ Object
30
31
32
|
# File 'lib/rpi/dht.rb', line 30
def read_22(pin, tries: 50)
Dht22.read(pin, tries: tries)
end
|
#read_22!(pin) ⇒ Object
26
27
28
|
# File 'lib/rpi/dht.rb', line 26
def read_22!(pin)
Dht22.read!(pin)
end
|
#set_numbering(bcm_or_board = :bcm) ⇒ Object
13
14
15
|
# File 'lib/rpi/dht.rb', line 13
def set_numbering(bcm_or_board = :bcm)
RPi::GPIO.set_numbering bcm_or_board.to_sym
end
|