About a month ago I built a texting temperature sensor, which had some energy-saving code I learned about. I wanted to see how many days it would last on one charge.
It's still running.
Initially, I had it texting to Twitter. Here's the first tweet, on Aug. 3:
John's Arduino detects Temp: 76.3 F | Hummidity 40.8% | Battery 92%
— BigSandbox (@theBigSandbox) August 3, 2015
Later, I pointed it at a table on the Sparkfun data-gathering site, and except for a few days when I was in an area without cell phone coverage, it's been texting every 20 minutes the whole time.
It's got a hefty battery attached to it, yet after more than a month, the charge has dropped just 6 percentage points from 92% to 86%. Whoa.
At this rate, I'd be waiting until Thanksgiving of next year before the battery died.
(Also I'd have to get a new SIM card.)
Here again is a description of the sleep code I'm using, which essentially replaces the Arduino delay() function with a low-power routine. More information and my code is available here.