SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
Functions
Battery

APIs for battery. More...

Functions

uint16_t hub_battery_get_voltage (void)
 Retrieve the battery voltage. More...
 
uint16_t hub_battery_get_current (void)
 Retrieve the battery current. More...
 

Detailed Description

APIs for battery.

Function Documentation

◆ hub_battery_get_current()

uint16_t hub_battery_get_current ( void  )

Retrieve the battery current.

Returns
Current in mA..

◆ hub_battery_get_voltage()

uint16_t hub_battery_get_voltage ( void  )

Retrieve the battery voltage.

Returns
Voltage in mV..