ESP8266-12 F/Moisture Sensor Analog Reading Problem
I recently ran into the analog read problem on an ESP12 and found that the problem is referenced here: 

https://github.com/esp8266/Arduino/commit/09bb75874deb95c22b4c09e63b842fc1f89eebc3

To resolve the problem I modified core_esp8266_wiring_analog.c as shown here:

extern int __analogRead(uint8_t pin)
{
    // accept both A0 constant and ADC channel number
    if(pin == 17 || pin == 0) {
        return readvdd33() &gt;&gt; 2; // readvdd33 is 12 bit
    }
    return digitalRead(pin) * 1023;
}