"""Simple test harness for BleComm module.

Run this with your project venv active. It will start the BleComm background loop,
attempt to connect, and try to send a simple LED command.
"""

import time
from src import BleComm

if __name__ == "__main__":
    try:
        print("Starting BleComm...")
        BleComm.start()
        print("Sleeping 8s to allow discovery/connection...")
        time.sleep(8)
        ok = BleComm.send_led_command(0x00, 0x00, 0x00, 0x01)
        print("send_led_command returned:", ok)
    finally:
        BleComm.stop()
        print("Stopped BleComm")
