2015-03-07 03:11:17 +01:00
|
|
|
HDC1000 = require("HDC1000")
|
|
|
|
|
|
|
|
sda = 1
|
|
|
|
scl = 2
|
2015-03-07 15:01:20 +01:00
|
|
|
drdyn = false
|
2015-03-07 03:11:17 +01:00
|
|
|
|
2015-03-07 15:01:20 +01:00
|
|
|
HDC1000.init(sda, scl, drdyn)
|
2015-03-07 03:11:17 +01:00
|
|
|
HDC1000.config() -- default values are used if called with no arguments. prototype is config(address, resolution, heater)
|
|
|
|
|
|
|
|
print(string.format("Temperature: %.2f °C\nHumidity: %.2f %%", HDC1000.getTemp(), HDC1000.getHumi()))
|
|
|
|
|
|
|
|
HDC1000 = nil
|
|
|
|
package.loaded["HDC1000"]=nil
|