With this success, I prepared a simple sketch that will broadcast Ibeacon, will communicate with the pc to continuously transmit battery charge level(2V up tp 4.2V) and add GATT Services to get the battery charge level and be able to turn on / off the piezo speaker. So sad that the nRF52832 Dev Board is not compatible with Arduino's Tone library, I am not able to upload the Super Mario Brothers theme music into it.
Creating the program(sketch) is the most critical part because the battery life depends on it, so the sketch must be highly optimized to save power and battery will at least last longer than 1 day. The sketch I created is not the best solution, there are better ways to do it to make it conserve energy and the 800mAH battery could last longer than 3 months. The piezo speaker can consume more than 50mA alone, while connecting to the device would consume 30mAnot to mention the builtin voltage regulator has a normal current leakage of 10 mA and of course the red LED connected to the power source normall consumes 16-18 mA(but this can be disconnected easily as sparkfun provided the connection at the back), at normal operation it(the nRf52832 ic alone) normally consumes around 7mA. I heard that other sketches can lower the normal consumption to 0.3mA or even down to 1microA that should be enough to make it last for several days by putting the device at deep sleep. The sketch I created would only let the device enter the low power mode. I have not tried to make it enter into deep sleep mode because the last time I tried it, the nRF connect app could not connect to it. Maybe there is a technique to make it not to interfere with the connection process.
To be honest, the connection is very stable, it does not disconnect making it ideal as a key finder.
Here is the hardware setup:
With this current configuration, I can charge the battery while programming it.
Sample Serial Output:
The nRF Connect App Screen:
Here is the screen recording:(you can hear the actual beeping of the beacon:
You may download the sketch here.