# Battery status from code

**URL:** <https://community.particle.io/t/battery-status-from-code/2676>\
**Category:** Firmware\
**Created:** [February 7, 2014, 11:14am UTC](https://community.particle.io/t/battery-status-from-code/2676 "2014-02-07T11:14:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noten](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/noten/32/354_2.png) [@Noten](https://community.particle.io/u/Noten)\
**Post date:** [February 7, 2014, 11:14am UTC](https://community.particle.io/t/battery-status-from-code/2676/1 "2014-02-07T11:14:42Z")

</div>

Dear Spark!

Is it possible to check the battery status from the spark code? It would be great to know the status of the battery so it would allow us to replace it, etc… (or at least forecast when will it go offline).

regards,  
Noten

---

<div class="post-metadata">

**Author:** ![Dom](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dom/32/142_2.png) [@Dom](https://community.particle.io/u/Dom)\
**Post date:** [February 7, 2014, 3:34pm UTC](https://community.particle.io/t/battery-status-from-code/2676/2 "2014-02-07T15:34:58Z")

</div>

I think you’ll need something like this…

> **[SparkFun LiPo Fuel Gauge - TOL-10617 - SparkFun Electronics](https://www.sparkfun.com/products/10617)**
>
> LiPo batteries are a great way to power your projects. They're small, lightweight, and pack a pretty good punch for their size. Unfortunately, even the bes

---

<div class="post-metadata">

**Author:** ![Noten](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/noten/32/354_2.png) [@Noten](https://community.particle.io/u/Noten)\
**Post date:** [February 7, 2014, 4:02pm UTC](https://community.particle.io/t/battery-status-from-code/2676/3 "2014-02-07T16:02:02Z")

</div>

hey Dom!

Thanks for the link!

I’m not a hardware genius, just thought maybe the battery shield is supporting something like this. Problem is a can’t determine on my own 😄

Noten

---

<div class="post-metadata">

**Author:** ![Dom](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dom/32/142_2.png) [@Dom](https://community.particle.io/u/Dom)\
**Post date:** [February 7, 2014, 4:11pm UTC](https://community.particle.io/t/battery-status-from-code/2676/4 "2014-02-07T16:11:17Z")

</div>

Setting up one of the gauges isn’t hard… However there are plans to build a battery shield with all of that function build in

[https://community.particle.io/t/interest-check-alternate-battery-shield/2564/last?redirected=true](https://community.particle.io/t/interest-check-alternate-battery-shield/2564/last?redirected=true)

Dom
