sensor v0.1.1 Sensor.Temp.Dht.Device

This module will read the DHT temp sensor and prcoess the result into an elixir value

This is implemented with the Adafruit_Python_DHT library and will work for Rpi and Rpi2

Please follow the instructions for the driver installation ( https://github.com/adafruit/Adafruit_Python_DHT )

and then copy the DHT.py to the project’s bin directory. The bin directory should be located where the program is started at, which will be depend on how this app is used. You may need to create this directory for your project.

Summary

Functions

Gets the temperature measurement from the sensor

Functions

read(type, gpio)

Gets the temperature measurement from the sensor.

type is the DHT sensor type (11|22)

gpio is the gpio that should be read

Examples

iex> Sensor.Temp.Dht.Device.read(11,4) # (Dht_type, gpio)
{:ok, %{temp: 20.0, humidity: 34.0}}