AM2320 connected to ESP01
VCC to AM2320 1
GPIO2 to AM2320 2
GND to AM2320 3
GPIO0 to AM2320 4
Sample code on ESP:
am2320.init(4,3)
rh,t=am2320.read()
print(string.format("RH: %s%%", rh / 10))
print(string.format("Temperature: %s degrees C", t / 10))But error message is only:
> dofile("a1.lua")
a1.lua:2: transmission error
stack traceback:
[C]: in function 'read'
a1.lua:2: in main chunk
[C]: in function 'dofile'
stdin:1: in main chunk
>
Modules are built in
NodeMCU custom build by frightanic.com
branch: master
commit: 7b83bbb2ea134cd85ac9d63108603cc02c4e20f7
SSL: false
modules: am2320,dht,file,gpio,i2c,net,node,tmr,uart,wifi
Any suggestion?