Working implementation for battery and accelerometer.