<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Potential Problem Reading VCC on NodeMCU]]></title><description><![CDATA[<p dir="auto">Hi All,<br />
On a NodeMCU Ver1, I was having problems with analogRead(A0) returning 65535 no matter what voltage I applied to the ADC pin?</p>
<p dir="auto">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....</p>
<p dir="auto">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.</p>
<p dir="auto">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).</p>
<p dir="auto">Perhaps one of the ArduinoESP8266 core developers can shed more light on this.</p>
<p dir="auto">Regards,</p>
<p dir="auto">Paul</p>
<p dir="auto"><strong>Background Reading:</strong></p>
<p dir="auto">Bug Issues: #338 #575 #695 #696 #2672  #3168  #4009</p>
<p dir="auto"><a href="https://forum.mysensors.org/topic/5547/wemos-d1-mini-esp8266-mysensors-and-analog-a0/6">https://forum.mysensors.org/topic/5547/wemos-d1-mini-esp8266-mysensors-and-analog-a0/6</a></p>
]]></description><link>https://forum.mysensors.org/topic/9004/potential-problem-reading-vcc-on-nodemcu</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 15:53:13 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/9004.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Feb 2018 08:03:53 GMT</pubDate><ttl>60</ttl></channel></rss>