obniz Parts Library

DHT12

GitHub
DHT12
Usable Devices :
obniz_board
Found at :

Temperature Sensor - DHT12

Temperature and Humidity sensor DHT12

wired(obniz, {vcc , sda, scl, gnd} )

the address of DHT12 can be choosed from 0x44,0x45.

// Javascript Example
var sensor = obniz.wired("DHT12",{scl:26,sda:0});

[await] getAllDataWait()

Get temperature and Humidity.

// Javascript Example
let device = obniz.wired("DHT12",{scl:26,sda:0});

let data = await device.getAllDataWait();
console.log(data);

[await] getTempWait()

Get a temperature. Unit is Celsius.

// Javascript Example
let device = obniz.wired("DHT12",{scl:26,sda:0});

let data = await device.getTempWait();
console.log(data);

[await] getHumdWait()

Get a Humidity. Unit is Ratio(%).

// Javascript Example
let device = obniz.wired("DHT12",{scl:26,sda:0});

let data = await device.getHumdWait();
console.log(data);

Supported from: obnizOS 3.5.0

You will Get in Few Days

Circuit for Starter “obniz Board” is available on Amazon and other online stores.
You can get it at below

Our products and resellers

Forum

Visit our developer’s forum to discuss and discover technologies.

Forum

Contact

Feel free to contact out support and technical team.

Contact us