I use 180K between A0 and Vcc for use with li-ion and Wemos mini. 510R is neither use nor ornament! Worse, in fact. You could have damaged the analog input already. As SamlAm93 says, the Max input is around 3.2~3.3V. The 510R does almost nothing to bring the 4.2V of the fully charged li-ion down to that level. The Wemos already has a built in voltage divider, and an external resistor extends the range of input values that can be safely accepted, but you need 100's of K, not a few hundred ohms.