blatann.examples.central_battery_service module

This example demonstrates reading and subscribing to a peripheral’s Battery service to get updates on the peripheral’s current battery levels. The operations here are programmed in a procedural manner.

This can be used alongside any peripheral which implements the Battery Service and advertises the 16-bit Battery Service UUID. The peripheral_battery_service example can be used with this.

blatann.examples.central_battery_service.on_battery_level_update(battery_service, event_args)
Parameters

battery_service

blatann.examples.central_battery_service.main(serial_port)