How to get battery status in python3

Hi all , I used python to collect data from MMR with this code but I can't get battery status, Please tell me how to get the value of battery status, or I missing something Thanks a lot.

acc = libmetawear.mbl_mw_acc_get_acceleration_data_signal(self.device.board)
gyro = libmetawear.mbl_mw_gyro_bmi160_get_rotation_data_signal(self.device.board)
batt = libmetawear.mbl_mw_settings_get_battery_state_data_signal(self.device.board)

signals = (c_void_p * 2)()
signals[0] = gyro
signals[1] = batt
libmetawear.mbl_mw_dataprocessor_fuser_create(acc, signals, 2, None, fn_wrapper)

e.wait()
libmetawear.mbl_mw_datasignal_subscribe(self.processor, None, self.callback)

Comments

  • This is already mentioned in another thread on the forum and is also in our tutorials.

Sign In or Register to comment.