Weird battery values
This is probably cpp sdk related, but I'm getting weird values from the battery readings of my MetaTracker.
Voltage jumping from 6 to 27 volts, and charge from 25% to 80% randomly.
Here's a function I use to get the voltage
function GetBattery(device, callback) {
if(!device || !device.connectedAndSetUp)
return;
if(device.battSignal){
MetaWear.mbl_mw_datasignal_unsubscribe(device.battSignal);
device.battSignal = null;
}
if(!callback){
return;
}
device.battSignal = MetaWear.mbl_mw_settings_get_battery_state_data_signal(device.board);
MetaWear.mbl_mw_datasignal_subscribe(device.battSignal, MetaWear.FnVoid_DataP.toPointer(function gotTimer(dataPtr) {
var data = dataPtr.deref();
var val = data.parseValue();
callback({
address: device.address,
epoch: data.epoch,
battery: val
});
//Unsubscribe
if(device.battSignal){
MetaWear.mbl_mw_datasignal_unsubscribe(device.battSignal);
device.battSignal = null;
}
}));
MetaWear.mbl_mw_datasignal_read(device.battSignal);
}
Is there anything I'm missing? I'm calling this function about twice per minute for now
What sensors are you using in addition to reading the battery values?
Oh I see, I'm using several sensors, including accelerometer and gyro, so drawing power is probably interfering with the readings, is that correct?
See this thread on our community forum: http://mbientlab.com/community/discussion/comment/1923/#Comment_1923
Understood, thanks