Potential Problem Reading VCC on NodeMCU

Hi All,
On a NodeMCU Ver1, I was having problems with analogRead(A0) returning 65535 no matter what voltage I applied to the ADC pin?

In researching the cause, I discovered that having MY_DEBUG and/or MY_SPECIAL_DEBUG defined causes the ADC_MODE to be configured by MySensors to read the CPU VCC and thus AnalogRead(A0) returns 65535 as a 'reminder' that the ADC port is not available, Fair enough....

However, in my reading I noted that for the ESP8266 to read VCC correctly, the ADC pin must remain unconnected (floating). Here is where I see a potential MySensors problem, all the latest NodeMCU Ver 1 boards that I have been receiving have a resistor divider, making the ADC input range 0 to 3.3 Volts, therefore the MySensors VCC reading will not be reliable on these boards and there is no config setting etc that can resolve this.

I've made this post to draw attention to this as I've not seen it addressed anywhere before (despite a full day's researching the issue (see references below).

Perhaps one of the ArduinoESP8266 core developers can shed more light on this.

Thanks @garystofer
Looks to me like this was fixed in https://github.com/mysensors/MySensors/pull/1113
You seem to be using very old code
Tombula created this issue in mysensors/MySensors
closed
Add sleep forever by sleep(0);
#1113

@berkseo sorry for reviving an old topic but i will try something similar with nrf52840 and rfx2401C. Did you able to work it out with the code you provided. I dont have the module but i placed that code in the sketch and it compiled so im not sure if it is going to work. how did it work out for you?

@yveaux thanks for that piece of information!!
This was driving me crazy. I know this is an old thread, but this is still a problem today.
I think this should be added to the documentation and probably add one example with this setup properly working.