SlideShare a Scribd company logo
1 of 38
Download to read offline
TITLE TEXT 
BATTERY LIFE 
STUART HARRELL
WHO IS THIS GUY? 
I’m an engineer on the firmware team. 
! 
I spend a lot of time working on battery life. 
! 
I also make Pebble apps (see right).
WHY YOU MIGHT CARE 
25% of customers say that battery life is important to 
them (will probably rise) 
! 
We may start telling customers about battery hogs (they 
don’t know) 
! 
???
OVERVIEW 
First 10 minutes — guessing game 
! 
Second 10 minute — getting more battery life in YOUR 
app 
! 
Last 10 minutes — interactive demo
GUESSING GAME
GUESS THE BATTERY LIFE 
1. Listen to scenario 
! 
2. Ponder carefully 
! 
3. Hold up fingers to show guess 
! 
4. Be yourself
PRACTICE ROUND! (MINUTE WATCH FACE) 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
PRACTICE ROUND! (MINUTE WATCH FACE) 
Answer is 4. More than 12 days. (14 days)
BACKLIGHT ON CONSTANTLY 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
BACKLIGHT ON CONSTANTLY 
Answer is 1. Less than 2 days. (4 hours)
WATCH FACE WITH SECONDS 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
WATCH FACE WITH SECONDS 
Answer is 3. Between 6 and 12 days. (9 days)
WATCH FACE WITH MINUTE ANIMATION 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
WATCH FACE WITH MINUTE ANIMATION 
Answer is 3. Between 6 and 12 days. 
(11 days)
WATCH FACE WITH MINUTE, BLUETOOTH OFF 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
WATCH FACE WITH MINUTE, BLUETOOTH OFF 
Answer is 4. More than 12 days. (36 days)
CONSTANT ANIMATION 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
CONSTANT ANIMATION 
Answer is 1. Less than 2 days. (1 day)
GRABBING WEATHER ONCE PER MINUTE 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
GRABBING WEATHER ONCE PER MINUTE 
Answer is 3. Between 6 and 12 days. (6 days)
GRABBING WEATHER ONCE PER SECOND 
1. Less than 2 days 
! 
2. Between 3 and 5 days 
! 
3. Between 6 and 12 days 
! 
4. More than 12 days
GRABBING WEATHER ONCE PER SECOND 
Answer is 1. Less than 2 days. (18 hours)
RECAP 
Backlight 
Constant Animation 
Bluetooth 
Tick Timer 
4 hours 
1 day at 30 fps 
6 days when using on minute 
18 hours when using on second 
36 days when turned off 
14 days with minute watch face 
9 days with second watch face
TIPS AND TRICKS THAT *YOU* CAN USE
BATCHING 
The CPU and bluetooth chip are power hogs 
! 
Every time the CPU wakes up, it has a system upkeep cost 
! 
Every time the bluetooth chip wakes up, it has to open the channel for 
communication and it remains in a high-power active mode for a short 
time
BATCH BLUETOOTH USAGE 
Sending app message on the minute = 6 day battery 
! 
! 
Sending app message on the second = 18 hours 
! 
! 
Sending 60 app messages on the minute = 6 day battery
BATCH ACCELEROMETER READINGS 
! 
100 Hz with 25 sample batches = 12 day battery (very small impact) 
! 
100 Hz with 1 sample batches = 8 day battery 
! 
! 
Above numbers are for when no processing is occurring. 
! 
Accelerometer cost = how much CPU is turned on
FPS MATTERS 
Rotating house 30fps = 1 day battery 
! 
Rotating house 10fps = 3 day battery 
! 
! 
More battery life or smoother animations? Which will 
your users prefer?
VERTICAL VS HORIZONTAL ANIMATIONS 
1-pixel row at 30fps = 5 day battery 
! 
1-pixel column at 30fps = 1 day battery 
! 
! 
! 
Why? Our display draws row-wise. 
! 
Consider trying to minimize the number of rows if you 
have a long-lasting animation
SECOND VS MINUTE WATCH FACES 
Simplicity with minutes = 14 days battery 
tick_timer_service_subscribe(MINUTE_UNIT, 
handle_minute_tick); 
! 
Simplicity with seconds = 9 days battery 
tick_timer_service_subscribe(SECOND_UNIT, 
handle_second_tick); 
! 
Power consumption is a mix between waking CPU and drawing to the 
display
DON’T LEAVE ON THE BACKLIGHT 
Will drain a fully charged battery in 4 hours 
! 
Be careful with light_enable 
! 
Consider giving users a choice if you do want to keep 
the backlight on 
! 
Don’t repeat my mistake!
SUMMARIZING 
Backlight 
Constant Animation 
Bluetooth 
Tick Timer 
Avoid light_enable 
Lower FPS and try to minimize the rows 
associated with the animation 
Batch calls that use bluetooth whenever 
possible 
Process data in larger batches (25) if your 
application permits 
Waking the CPU every second is more 
expensive then waking every minute 
Accelerometer
DEMO TIME
SCREENSHOT 1
SCREENSHOT 2
SCREENSHOT 3
NOW IT’S YOUR TURN 
Demo link: http://arcane-escarpment-6914.herokuapp.com 
! 
! 
! 
! 
Email me: stuart@getpebble.com 
! 
Tweet me: @StuartHarrell1
BLUETOOTH LE WORKSHOP 
11:00 
Martijn

More Related Content

Similar to Battery Life | Pebble Developer Retreat 2014

351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdfkalelboss
 
How To Choose The Perfect Digital Camera For You
How To Choose The Perfect Digital Camera For You How To Choose The Perfect Digital Camera For You
How To Choose The Perfect Digital Camera For You gustyaffection876
 
Project and lean product management
Project and lean product managementProject and lean product management
Project and lean product managementGilles TOUSSAINT
 
Programmer, Ikaw ay Game jammer
Programmer, Ikaw  ay Game jammerProgrammer, Ikaw  ay Game jammer
Programmer, Ikaw ay Game jammerJulius Cebreros
 
Design Principal for Action on Google
Design Principal for Action on GoogleDesign Principal for Action on Google
Design Principal for Action on GoogleHoney Sharma
 

Similar to Battery Life | Pebble Developer Retreat 2014 (7)

351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
351111888-Commodore-64-Assembly-Language-Arcade-Programming-pdf.pdf
 
How To Choose The Perfect Digital Camera For You
How To Choose The Perfect Digital Camera For You How To Choose The Perfect Digital Camera For You
How To Choose The Perfect Digital Camera For You
 
Project and lean product management
Project and lean product managementProject and lean product management
Project and lean product management
 
Learning101
Learning101Learning101
Learning101
 
Programmer, Ikaw ay Game jammer
Programmer, Ikaw  ay Game jammerProgrammer, Ikaw  ay Game jammer
Programmer, Ikaw ay Game jammer
 
Design Principal for Action on Google
Design Principal for Action on GoogleDesign Principal for Action on Google
Design Principal for Action on Google
 
Flat Panel Display
Flat Panel DisplayFlat Panel Display
Flat Panel Display
 

More from Pebble Technology

#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore AssetsPebble Technology
 
#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap WorkshopPebble Technology
 
#PDR15 - Data Analytics and Pebble
#PDR15 - Data Analytics and Pebble#PDR15 - Data Analytics and Pebble
#PDR15 - Data Analytics and PebblePebble Technology
 
#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For TimelinePebble Technology
 
#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble AppPebble Technology
 
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and ChalkPebble Technology
 
#PDR15 - Developing for Round
#PDR15 - Developing for Round#PDR15 - Developing for Round
#PDR15 - Developing for RoundPebble Technology
 
#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble#PDR15 - Designing for Pebble
#PDR15 - Designing for PebblePebble Technology
 
Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014Pebble Technology
 
Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014Pebble Technology
 
Connecting Pebble to the World
Connecting Pebble to the WorldConnecting Pebble to the World
Connecting Pebble to the WorldPebble Technology
 
Guest Presentation - Strap | Pebble Developer Retreat 2014
Guest Presentation - Strap | Pebble Developer Retreat 2014Guest Presentation - Strap | Pebble Developer Retreat 2014
Guest Presentation - Strap | Pebble Developer Retreat 2014Pebble Technology
 
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014Pebble Technology
 
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014Pebble Technology
 

More from Pebble Technology (20)

#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets#PDR15 - Awesome Appstore Assets
#PDR15 - Awesome Appstore Assets
 
#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop#PDR15 - Smartstrap Workshop
#PDR15 - Smartstrap Workshop
 
#PDR15 - Data Analytics and Pebble
#PDR15 - Data Analytics and Pebble#PDR15 - Data Analytics and Pebble
#PDR15 - Data Analytics and Pebble
 
#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline#PDR15 - Best Use Cases For Timeline
#PDR15 - Best Use Cases For Timeline
 
#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App#PDR15 - waf, wscript and Your Pebble App
#PDR15 - waf, wscript and Your Pebble App
 
#PDR15 - PebbleKit iOS 3.0
#PDR15 - PebbleKit iOS 3.0#PDR15 - PebbleKit iOS 3.0
#PDR15 - PebbleKit iOS 3.0
 
#PDR15 - Voice API
#PDR15 - Voice API#PDR15 - Voice API
#PDR15 - Voice API
 
#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics#PDR15 - Pebble Graphics
#PDR15 - Pebble Graphics
 
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
#PDR15 Creating Pebble Apps for Aplite, Basalt, and Chalk
 
#PDR15 - Developing for Round
#PDR15 - Developing for Round#PDR15 - Developing for Round
#PDR15 - Developing for Round
 
#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble#PDR15 - Designing for Pebble
#PDR15 - Designing for Pebble
 
#PDR15 Kick-Off
#PDR15 Kick-Off#PDR15 Kick-Off
#PDR15 Kick-Off
 
Pebble Slate Workshop
Pebble Slate WorkshopPebble Slate Workshop
Pebble Slate Workshop
 
Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014Overlay Technique | Pebble Developer Retreat 2014
Overlay Technique | Pebble Developer Retreat 2014
 
Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014Overlay & Libraries | Pebble Meetup Oct. 2014
Overlay & Libraries | Pebble Meetup Oct. 2014
 
Connecting Pebble to the World
Connecting Pebble to the WorldConnecting Pebble to the World
Connecting Pebble to the World
 
Guest Presentation - Strap | Pebble Developer Retreat 2014
Guest Presentation - Strap | Pebble Developer Retreat 2014Guest Presentation - Strap | Pebble Developer Retreat 2014
Guest Presentation - Strap | Pebble Developer Retreat 2014
 
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
 
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014Advanced Techniques: Graphics | Pebble Developer Retreat 2014
Advanced Techniques: Graphics | Pebble Developer Retreat 2014
 
Pebble wearables devcon
Pebble wearables devconPebble wearables devcon
Pebble wearables devcon
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

Battery Life | Pebble Developer Retreat 2014

  • 1. TITLE TEXT BATTERY LIFE STUART HARRELL
  • 2. WHO IS THIS GUY? I’m an engineer on the firmware team. ! I spend a lot of time working on battery life. ! I also make Pebble apps (see right).
  • 3. WHY YOU MIGHT CARE 25% of customers say that battery life is important to them (will probably rise) ! We may start telling customers about battery hogs (they don’t know) ! ???
  • 4. OVERVIEW First 10 minutes — guessing game ! Second 10 minute — getting more battery life in YOUR app ! Last 10 minutes — interactive demo
  • 6. GUESS THE BATTERY LIFE 1. Listen to scenario ! 2. Ponder carefully ! 3. Hold up fingers to show guess ! 4. Be yourself
  • 7. PRACTICE ROUND! (MINUTE WATCH FACE) 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 8. PRACTICE ROUND! (MINUTE WATCH FACE) Answer is 4. More than 12 days. (14 days)
  • 9. BACKLIGHT ON CONSTANTLY 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 10. BACKLIGHT ON CONSTANTLY Answer is 1. Less than 2 days. (4 hours)
  • 11. WATCH FACE WITH SECONDS 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 12. WATCH FACE WITH SECONDS Answer is 3. Between 6 and 12 days. (9 days)
  • 13. WATCH FACE WITH MINUTE ANIMATION 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 14. WATCH FACE WITH MINUTE ANIMATION Answer is 3. Between 6 and 12 days. (11 days)
  • 15. WATCH FACE WITH MINUTE, BLUETOOTH OFF 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 16. WATCH FACE WITH MINUTE, BLUETOOTH OFF Answer is 4. More than 12 days. (36 days)
  • 17. CONSTANT ANIMATION 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 18. CONSTANT ANIMATION Answer is 1. Less than 2 days. (1 day)
  • 19. GRABBING WEATHER ONCE PER MINUTE 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 20. GRABBING WEATHER ONCE PER MINUTE Answer is 3. Between 6 and 12 days. (6 days)
  • 21. GRABBING WEATHER ONCE PER SECOND 1. Less than 2 days ! 2. Between 3 and 5 days ! 3. Between 6 and 12 days ! 4. More than 12 days
  • 22. GRABBING WEATHER ONCE PER SECOND Answer is 1. Less than 2 days. (18 hours)
  • 23. RECAP Backlight Constant Animation Bluetooth Tick Timer 4 hours 1 day at 30 fps 6 days when using on minute 18 hours when using on second 36 days when turned off 14 days with minute watch face 9 days with second watch face
  • 24. TIPS AND TRICKS THAT *YOU* CAN USE
  • 25. BATCHING The CPU and bluetooth chip are power hogs ! Every time the CPU wakes up, it has a system upkeep cost ! Every time the bluetooth chip wakes up, it has to open the channel for communication and it remains in a high-power active mode for a short time
  • 26. BATCH BLUETOOTH USAGE Sending app message on the minute = 6 day battery ! ! Sending app message on the second = 18 hours ! ! Sending 60 app messages on the minute = 6 day battery
  • 27. BATCH ACCELEROMETER READINGS ! 100 Hz with 25 sample batches = 12 day battery (very small impact) ! 100 Hz with 1 sample batches = 8 day battery ! ! Above numbers are for when no processing is occurring. ! Accelerometer cost = how much CPU is turned on
  • 28. FPS MATTERS Rotating house 30fps = 1 day battery ! Rotating house 10fps = 3 day battery ! ! More battery life or smoother animations? Which will your users prefer?
  • 29. VERTICAL VS HORIZONTAL ANIMATIONS 1-pixel row at 30fps = 5 day battery ! 1-pixel column at 30fps = 1 day battery ! ! ! Why? Our display draws row-wise. ! Consider trying to minimize the number of rows if you have a long-lasting animation
  • 30. SECOND VS MINUTE WATCH FACES Simplicity with minutes = 14 days battery tick_timer_service_subscribe(MINUTE_UNIT, handle_minute_tick); ! Simplicity with seconds = 9 days battery tick_timer_service_subscribe(SECOND_UNIT, handle_second_tick); ! Power consumption is a mix between waking CPU and drawing to the display
  • 31. DON’T LEAVE ON THE BACKLIGHT Will drain a fully charged battery in 4 hours ! Be careful with light_enable ! Consider giving users a choice if you do want to keep the backlight on ! Don’t repeat my mistake!
  • 32. SUMMARIZING Backlight Constant Animation Bluetooth Tick Timer Avoid light_enable Lower FPS and try to minimize the rows associated with the animation Batch calls that use bluetooth whenever possible Process data in larger batches (25) if your application permits Waking the CPU every second is more expensive then waking every minute Accelerometer
  • 37. NOW IT’S YOUR TURN Demo link: http://arcane-escarpment-6914.herokuapp.com ! ! ! ! Email me: stuart@getpebble.com ! Tweet me: @StuartHarrell1
  • 38. BLUETOOTH LE WORKSHOP 11:00 Martijn