Difference between revisions of "Gb.battery.voltage"

From Gamebuino Wiki
Jump to: navigation, search
(creation)
 
m (Returns: changed int16 to int)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:gb.battery.voltage}}
+
{{lowercase}}
 
__NOTOC__
 
__NOTOC__
 
== Description ==
 
== Description ==
Line 5: Line 5:
  
 
== Syntax ==
 
== Syntax ==
<pre>gb.frameDurationMicros</pre>
+
<pre>gb.battery.voltage</pre>
  
 
== Parameters ==
 
== Parameters ==
Line 11: Line 11:
  
 
== Returns ==
 
== Returns ==
unsigned long: time spend to render the last frame in microseconds. It includes time consumed by the library to refresh the screen, update the sound, backlight, battery monitor, etc.
+
unsigned int: battery voltage.
  
 
== Example ==
 
== Example ==
 
The battery_logger example logs the battery voltage to the micro SD card every 10 minutes. It's provided by default on the SD card and is named BAT-LOG.HEX
 
The battery_logger example logs the battery voltage to the micro SD card every 10 minutes. It's provided by default on the SD card and is named BAT-LOG.HEX
  
Here is a typical voltage evolution during battery discharge (with no sound and no backlight):
 
 
[[File:Gamebuino_lipo_battery_voltage.png]]
 
 
<gistit>https://github.com/Rodot/Gamebuino/blob/master/libraries/Gamebuino/examples/4.Utilities/Battery_logger/Battery_logger.ino</gistit>
 
<gistit>https://github.com/Rodot/Gamebuino/blob/master/libraries/Gamebuino/examples/4.Utilities/Battery_logger/Battery_logger.ino</gistit>
  
 
== See also ==
 
== See also ==
 +
*[[Power consumption]]
 +
*[[gb.battery.level]]

Latest revision as of 2014-05-24T16:59:14

Description

Gives the measured voltage of the battery expressed in millivolts (mV).

Syntax

gb.battery.voltage

Parameters

none

Returns

unsigned int: battery voltage.

Example

The battery_logger example logs the battery voltage to the micro SD card every 10 minutes. It's provided by default on the SD card and is named BAT-LOG.HEX

See also