CubeCell AB01 V2 Battery Voltage

Im doing mostlyt PWM on the cubecell and its working a treat. Because the system is battery powered I wanted to check and give myself an alert if the battery dropped below a predefined level.

Im using 1.2.0 and testing I tried to integrate some code from a previous project that just really allows me to get the battey level but that seems to not be working.

I then tried the example that uses getBatteryVoltage() and with the battery connected and the battery voltage at 3.5v im its returning 16.
If i dissconnect the battery i still get 16.
connecting another battery that was was a little lower and its still reading 16.

Any toughts on this?

For what it’s worth, I just replaced the CubeCell AB01 (V1) on one of my test rigs with a V2.2 board and the latter seems to be reading the battery voltage as expected (running exactly the same sketch as the V1 board, which reads the battery voltage—just selecting CubeCell-Board-V2 instead of CubeCell-Board). I’m also using v1.2.0 of the CubeCell support code.

You may have a dud board, but could the problem just be a pin definition mismatch? If you’ve selected the V2 board, the appropriate pins_arduino.h file should be loaded automatically, but if you’ve [re]defined pins within your sketch, there may be a conflict.

Its Fixed! I just updated to v1.5.0. then the AB01-V2 became available for selection.
I did notice that I was pointed toward some other source for the json so that was not helping things.

Hello, I also have a problem with measuring the supply battery. I am using the example code LoRaWan Interrupt for my Heltec AB01 board. It works wonderfully and is very power-efficient. Now, I would like to send the battery status with every trigger and with each daily status update. How can this be done in the simplest way? Sorry, I am not an expert in programming. Thank you in advance.
Hans

If you’re wanting to know how to read the battery voltage: