Page 1 of 1

node.dsleep option =4 makes adc.read failure ?!

PostPosted: Mon Apr 25, 2016 4:26 am
by LuRhe
I'm use node.dsleep with option = 4 to prevent high power supply current when reboot from dsleep. If reboot completed my program reads adc value but instead of correct reading at cold boot it returns every time 1024 regardless of actual pin voltage (I've flashed init byte to use adc.read instead of adc.readvdd33). Means dsleep option > 0 that the adc doesn't work correct? This isn't useful and not documented. Can anyone check and explain this?

edit: with dsleep option 0 or dsleep option 2 the function adc.read seams to be functionally

Re: node.dsleep option =4 makes adc.read failure ?!

PostPosted: Wed Jun 22, 2016 5:57 am
by marcelstoer
Maybe it helps if you use a current firmware that offers setting the ADC config from Lua.

http://nodemcu.readthedocs.io/en/master ... _init_mode