Contiki-Inga 3.x
Battery Sensor

This sensor interface allows to monitor the supply voltage and current of the INGA sensor platform. More...

Data Output Channels

#define BATTERY_VOLTAGE   2
 Returns battery voltage im mV.
 
#define BATTERY_CURRENT   3
 Returns battery current im mA.
 

Detailed Description

This sensor interface allows to monitor the supply voltage and current of the INGA sensor platform.

Query measurements

acc_sensor.value(channel)

The sensor provides 2 data channels.

Example Usage

#include <sensors.h>
[...]
struct sensors_sensor batterysensor = find_sensor("Batt");
ACTIVATE_SENSOR(batterysensor);
[...]
int v = batterysensor.value(BATTERY_VOLTAGE);
int i = batterysensor.value(BATTERY_CURRENT);