get_dht11_sensor: Get a DHT11 sensor instance.

Description Usage Arguments Value Examples

View source: R/get_dht11_sensor.R

Description

Returns a DHT11 sensor instance ready to be read.

Usage

1

Arguments

pin

An integer of length one with the GPIO pin that the sensor is connected to.

Value

A DHT11 S4 object, this object will be set to work with the selected sensor.

Examples

1
2
3
4
5
6
7
## Not run: 
# Get a DHT11 instance connected at GPIO 14.
dht11_14 <- get_dht11_sensor(14)
# Get a DHT11 instance connected at GPIO 18.
dht11_18 <- get_dht11_sensor(18)

## End(Not run)

jcrodriguez1989/r2dht11 documentation built on Sept. 6, 2020, 12:07 a.m.