Hi msfujino,
Thank you for the prompt reply. And I’ll only be happy to send you the code, of course. Where can I find your email address, in your profile? I’m a total newbie here, and haven’t even looked around properly so far.
Your code seemed spot on to me, though, and unless it was just some kind of coincidence, it was showing the correct voltage to the second decimal place. I took a brand new battery from the package, and checked the voltage before I attached it to the circuit, and it was around 3.8V, which is the same result I’ve got from your code. I used the standard resistors, because I don’t have any with tighter tolerance, although I did measure a number of them to select two with as equal resistance as possible. In fact, the only problem was that everything else stopped working, your code was working flawlessly. Now that I changed V0 to V2, though, it’s sending totally random values, although the actual voltage is the same as before.
I’ve read all the stuff from your links when I first visited this forum, and saved and checked your image about charging characteristics. I thing I have datasheets of both components, although I need to find the one for G3JS. If I find it, I can email you both.
Last time I visited this site, I stumbled upon some kind of XIAO dedicated page and there the charging current of ESPC3 was 350mA, not 370. I guess the designer of this board sobered a bit, and tried to tone down that epic choice of parameter a little
I had other problems with this board today. The upload ended with fatal error a couple of times, with the message about lost connection, and I was using two boards, so it was not a malfunction of just one of them. I’ve read somewhere on this forum if I recall correctly, that I should always reboot by using both buttons in sequence before the upload, but I mostly did not do that and everything worked anyway, and then failed exactly after I did. So all in all, this board seems kind of inconsistent, at least in comparison with other XIAO boards, as much as I can say, although I’m far from being any kind of authority when it comes to programming…
OK, thanks again, I’ll try to find your email address here, and send you the code and datasheets, and if it can’t be found, you can PM me, or however it’s done around here.
Cheers,
Miso