NodeMCU Lua AM2315 temperature and humidity sensor
##Require
am2315 = require("am2315")am2315 = nil
package.loaded["am2315"]=nil##Example
####Description
getting temperature and humidity data from am2315.
####Syntax am2315.getData()
####init Parameters
sda: 112, IO index.12, IO index.
scl: 1
addr: i2c address (default 0x5c).
am2315 = require("am2315")
gpio0 = 4
gpio2 = 3
sda = gpio0
scl = gpio2
am2315.init(sda, scl)
-- Get temperature and humidity.
t,h = am2315.getData()
print(t, h)
-- Don't forget to release it after use
am2315 = nil
package.loaded["am2315"]=nil