bluetooth_controller module
- class bluetooth_controller.BluefruitController(debug=False)
Bases:
object- check_connection()
Simplified connection checking based on working sample pattern.
- check_manual_beat()
Check and consume manual beat trigger.
- cleanup()
Clean up Bluetooth resources.
- disable_debug()
Disable debug output.
- enable_debug()
Enable debug output.
- get_brightness_override()
Get current brightness override from Bluetooth.
- get_color_override()
Get direct color override from Color Picker.
- get_connection_info()
Get detailed connection status for debugging.
- get_effect_modifier()
Get current effect modifier.
- get_mode_override()
Get current mode override from Bluetooth.
- get_rotation_speed_modifier()
Get current rotation speed modifier.
- handle_disconnection()
Handle when a device disconnects.
- is_connected()
Check if we have an active connection - simplified version.
- manage_advertising()
Manage advertising lifecycle - call this regularly in main loop.
- process_commands()
Process incoming commands from Bluefruit Connect app.
- send_response(message)
Send response back to Bluefruit Connect app.
- set_advertising_config(timeout_seconds=120, auto_readvertise=True, readvertise_interval=300)
Configure advertising behavior.
- start_advertising(timeout_seconds=120)
Start advertising with configurable timeout.