Wemos A0 does not read voltage

This still does not make sense to me. You are saying that with the above connections, if you connect the 100K to the Wemos 5V pin, you get a 1023 reading. But if you connect the 100K to the output of the tp4056, you get no reading? But those two places are joined with wire. It should work just the same in either place.

Well i did some tries from A0 to:

5v pin
output of tp4056
output of battery

at the 5v pin i've got some 1023 readings for a short time.
For now i dont have readings at all. When the wire is connected or not the output stays 2.

Im lost.

A clear picture (real, not Fritzing) was requested in post#2.
Sometimes we can spot something that you didn't think off.
Leo..

Are you using a breadboard? Maybe it's connections are bent or worn. Try another breadboard, or at least a different part of the breadboard. Have you soldered the pins on to the Wemos and the other modules, or just pushed the connections into the holes? That can cause problems.

These symptoms indeed start to sound like poor connections.

Pins must be soldered in or they will not make a reliable connection. Breadboards are indeed another source of potentially poor connections, wires may have internal faults.

Thank you all for you're respone. I will check the soldering tonight and will post a clear picture (sorry missed that request).

The whole situation is soldered already. So im not able to use a breadboard anymore.

srozemuller:
The whole situation is soldered already. So im not able to use a breadboard anymore.

The purpose of a breadboard is to test a circuit and check it works before you solder everything. If any of the components are faulty, you can easily swap them out.

PaulRB:
The purpose of a breadboard is to test a circuit and check it works before you solder everything. If any of the components are faulty, you can easily swap them out.

I know, this is some additional functionality i didn't think of in the first place.

Oh, you were not using the A0 pin before.

Hopefully it's just faulty wiring. The fact that the analog input works connected to some points in the circuit and not others points to that.

Ok guys, it took some while. Very busy with moving to an another place. But finally had some time to troubleshoot. It was a poor connection to the A0. Now it is working fine.

Thank you al for your feedback. Learned a lot.

hello, could I see the code you used to read the battery voltage? at the end what was the correct circuit?