Software-only battery level monitor for Arduino?

Is it possible to monitor the battery charge level on an Arduino-compatible system solely using software (no extra wiring)? I’ve seen setups such as https://github.com/rlogiacco/VoltageReference, but running that gives a printout of a constant 3.3V (which Arduino variant I have). I’d like to monitor the percentage, not just a “low/ok” setup like the “Uh-Oh” kit (Kit-11087).

This method gives you the Vcc voltage (to be precise: AVcc pin) that the AVR microprocessor is supplied with. It doesn’t care where it comes from/what generates it. If you have a 3.3 volt linear regulator between it and the battery then it’s giving that 3.3v output voltage back. And this would explain your result. Only if the battery supplies the AVR chip (a)Vcc pin directly does it work as a crude battery-life indicator. It also needs a capacitor between the Aref input and Gnd to stabilize it. I’m not sure if that is standard in Arduino boards, the Aref pin on your board might be unconnected and floating. Without the capacitor you can get noisy values. That is also the pin which you should measure the voltage with a voltmeter to calibrate it. Each chip has a (slightly) different internal reference voltage, so you really should do this.

If the battery NEVER can go above 5.5 volt then you can connect it directly to Vcc and Gnd, and bypass the linear regulator. But this comes with consequences for the rest of your circuit, which needs to be able to account for variations in the supply voltage. It’s not steady at 3.3 volt any more.

As this only measures the (battery) voltage it is only a crude way to know remaining battery life. As the voltage also depends on how much current is drawn from it, temperature and all that. So you have no sure way of knowing how long it lasts. There are special battery-state chips/modules that can give a reasonably accurate percentage based on voltage alone. But you want minimal hardware.